Class SchemaCompatibilityValidator

  • All Implemented Interfaces:
    FilterPredicate.Visitor<Void>

    public class SchemaCompatibilityValidator
    extends Object
    implements FilterPredicate.Visitor<Void>
    Inspects the column types found in the provided FilterPredicate and compares them to the actual schema found in the parquet file. If the provided predicate's types are not consistent with the file schema, and IllegalArgumentException is thrown. Ideally, all this would be checked at compile time, and this class wouldn't be needed. If we can come up with a way to do that, we should. This class is stateful, cannot be reused, and is not thread safe. TODO: detect if a column is optional or required and validate that eq(null) TODO: is not called on required fields (is that too strict?) TODO: (https://issues.apache.org/jira/browse/PARQUET-44)