Class ValidTypeMap


  • public class ValidTypeMap
    extends Object
    Contains all valid mappings from class -> parquet type (and vice versa) for use in FilterPredicates This is a bit ugly, but it allows us to provide good error messages at runtime when there are type mismatches. TODO: this has some overlap with PrimitiveType.PrimitiveTypeName.javaType TODO: (https://issues.apache.org/jira/browse/PARQUET-30)
    • Method Detail

      • assertTypeValid

        public static <T extends Comparable<T>> void assertTypeValid​(Operators.Column<T> foundColumn,
                                                                     PrimitiveType.PrimitiveTypeName primitiveType)
        Asserts that foundColumn was declared as a type that is compatible with the type for this column found in the schema of the parquet file.
        Type Parameters:
        T - the java Type of values in the column, must be Comparable
        Parameters:
        foundColumn - the column as declared by the user
        primitiveType - the primitive type according to the schema
        Throws:
        IllegalArgumentException - if the types do not align