Package io.trino.parquet.predicate
Interface Predicate
-
- All Known Implementing Classes:
TupleDomainParquetPredicate
public interface Predicate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 columnIndex, 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.
-
-
-
Method Detail
-
matches
boolean matches(long numberOfRows, Map<org.apache.parquet.column.ColumnDescriptor,org.apache.parquet.column.statistics.Statistics<?>> statistics, ParquetDataSourceId id) throws ParquetCorruptionExceptionShould the Parquet Reader process a file section with the specified statistics.- 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
boolean matches(DictionaryDescriptor dictionary)
Should 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.- Parameters:
dictionary- The single column dictionary
-
matches
boolean matches(long numberOfRows, org.apache.parquet.internal.filter2.columnindex.ColumnIndexStore columnIndex, ParquetDataSourceId id) throws ParquetCorruptionExceptionShould the Parquet Reader process a file section with the specified statistics.- Parameters:
numberOfRows- the number of rows in the segment; this can be used with Statistics to determine if a column is only nullcolumnIndex- column index (statistics) storeid- Parquet file name- Throws:
ParquetCorruptionException
-
toParquetFilter
Optional<org.apache.parquet.filter2.predicate.FilterPredicate> toParquetFilter(org.joda.time.DateTimeZone timeZone)
Convert Predicate to Parquet filter if possible.- Parameters:
timeZone- current Parquet timezone- Returns:
- Converted Parquet filter or null if conversion not possible
-
-