Class ValidTypeMap
java.lang.Object
org.apache.parquet.filter2.predicate.ValidTypeMap
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://github.com/apache/parquet-java/issues/1447)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
voidassertTypeValid(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.
-
Method Details
-
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 userprimitiveType- the primitive type according to the schema- Throws:
IllegalArgumentException- if the types do not align
-