Package io.trino.parquet.predicate
Class TupleDomainParquetPredicate
- java.lang.Object
-
- io.trino.parquet.predicate.TupleDomainParquetPredicate
-
-
Constructor Summary
Constructors Constructor Description TupleDomainParquetPredicate(TupleDomain<org.apache.parquet.column.ColumnDescriptor> effectivePredicate, List<RichColumnDescriptor> columns, org.joda.time.DateTimeZone timeZone)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longasLong(Object value)static DomaingetDomain(Type type, long rowCount, org.apache.parquet.internal.column.columnindex.ColumnIndex columnIndex, ParquetDataSourceId id, RichColumnDescriptor descriptor, org.joda.time.DateTimeZone timeZone)static DomaingetDomain(Type type, DictionaryDescriptor dictionaryDescriptor)static DomaingetDomain(org.apache.parquet.column.ColumnDescriptor column, Type type, long rowCount, org.apache.parquet.column.statistics.Statistics<?> statistics, ParquetDataSourceId id, org.joda.time.DateTimeZone timeZone)booleanmatches(long numberOfRows, Map<org.apache.parquet.column.ColumnDescriptor,org.apache.parquet.column.statistics.Statistics<?>> statistics, ParquetDataSourceId id)Should the Parquet Reader process a file section with the specified statistics.booleanmatches(long numberOfRows, org.apache.parquet.internal.filter2.columnindex.ColumnIndexStore columnIndexStore, ParquetDataSourceId id)Should the Parquet Reader process a file section with the specified statistics.booleanmatches(DictionaryDescriptor dictionary)Should the Parquet Reader process a file section with the specified dictionary based on that single dictionary.Optional<org.apache.parquet.filter2.predicate.FilterPredicate>toParquetFilter(org.joda.time.DateTimeZone timeZone)Convert Predicate to Parquet filter if possible.
-
-
-
Constructor Detail
-
TupleDomainParquetPredicate
public TupleDomainParquetPredicate(TupleDomain<org.apache.parquet.column.ColumnDescriptor> effectivePredicate, List<RichColumnDescriptor> columns, org.joda.time.DateTimeZone timeZone)
-
-
Method Detail
-
matches
public boolean matches(long numberOfRows, Map<org.apache.parquet.column.ColumnDescriptor,org.apache.parquet.column.statistics.Statistics<?>> statistics, ParquetDataSourceId id) throws ParquetCorruptionExceptionDescription copied from interface:PredicateShould the Parquet Reader process a file section with the specified statistics.- Specified by:
matchesin interfacePredicate- Parameters:
numberOfRows- the number of rows in the segment; this can be used with Statistics to determine if a column is only nullstatistics- column statisticsid- Parquet file name- Throws:
ParquetCorruptionException
-
matches
public boolean matches(DictionaryDescriptor dictionary)
Description copied from interface:PredicateShould the Parquet Reader process a file section with the specified dictionary based on that single dictionary. This is safe to check repeatedly to avoid loading more parquet dictionaries if the section can already be eliminated.
-
matches
public boolean matches(long numberOfRows, org.apache.parquet.internal.filter2.columnindex.ColumnIndexStore columnIndexStore, ParquetDataSourceId id) throws ParquetCorruptionExceptionDescription copied from interface:PredicateShould the Parquet Reader process a file section with the specified statistics.- Specified by:
matchesin interfacePredicate- Parameters:
numberOfRows- the number of rows in the segment; this can be used with Statistics to determine if a column is only nullcolumnIndexStore- column index (statistics) storeid- Parquet file name- Throws:
ParquetCorruptionException
-
toParquetFilter
public Optional<org.apache.parquet.filter2.predicate.FilterPredicate> toParquetFilter(org.joda.time.DateTimeZone timeZone)
Description copied from interface:PredicateConvert Predicate to Parquet filter if possible.- Specified by:
toParquetFilterin interfacePredicate- Parameters:
timeZone- current Parquet timezone- Returns:
- Converted Parquet filter or null if conversion not possible
-
getDomain
public static Domain getDomain(org.apache.parquet.column.ColumnDescriptor column, Type type, long rowCount, org.apache.parquet.column.statistics.Statistics<?> statistics, ParquetDataSourceId id, org.joda.time.DateTimeZone timeZone) throws ParquetCorruptionException
- Throws:
ParquetCorruptionException
-
getDomain
public static Domain getDomain(Type type, long rowCount, org.apache.parquet.internal.column.columnindex.ColumnIndex columnIndex, ParquetDataSourceId id, RichColumnDescriptor descriptor, org.joda.time.DateTimeZone timeZone) throws ParquetCorruptionException
- Throws:
ParquetCorruptionException
-
getDomain
public static Domain getDomain(Type type, DictionaryDescriptor dictionaryDescriptor)
-
asLong
public static long asLong(Object value)
-
-