Class ValidTypeMap
- java.lang.Object
-
- org.apache.parquet.filter2.predicate.ValidTypeMap
-
public class ValidTypeMap extends Object
Contains all valid mappings from class -> parquet type (and vice versa) for use inFilterPredicates 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 withPrimitiveType.PrimitiveTypeName.javaTypeTODO: (https://issues.apache.org/jira/browse/PARQUET-30)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 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 userprimitiveType- the primitive type according to the schema- Throws:
IllegalArgumentException- if the types do not align
-
-