Class TupleDomainParquetPredicate

    • 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 ParquetCorruptionException
        Description copied from interface: Predicate
        Should the Parquet Reader process a file section with the specified statistics.
        Specified by:
        matches in interface Predicate
        Parameters:
        numberOfRows - the number of rows in the segment; this can be used with Statistics to determine if a column is only null
        statistics - column statistics
        id - Parquet file name
        Throws:
        ParquetCorruptionException
      • matches

        public boolean matches​(DictionaryDescriptor dictionary)
        Description copied from interface: Predicate
        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.
        Specified by:
        matches in interface Predicate
        Parameters:
        dictionary - The single column dictionary
      • matches

        public boolean matches​(long numberOfRows,
                               org.apache.parquet.internal.filter2.columnindex.ColumnIndexStore columnIndexStore,
                               ParquetDataSourceId id)
                        throws ParquetCorruptionException
        Description copied from interface: Predicate
        Should the Parquet Reader process a file section with the specified statistics.
        Specified by:
        matches in interface Predicate
        Parameters:
        numberOfRows - the number of rows in the segment; this can be used with Statistics to determine if a column is only null
        columnIndexStore - column index (statistics) store
        id - Parquet file name
        Throws:
        ParquetCorruptionException
      • toParquetFilter

        public Optional<org.apache.parquet.filter2.predicate.FilterPredicate> toParquetFilter​(org.joda.time.DateTimeZone timeZone)
        Description copied from interface: Predicate
        Convert Predicate to Parquet filter if possible.
        Specified by:
        toParquetFilter in interface Predicate
        Parameters:
        timeZone - current Parquet timezone
        Returns:
        Converted Parquet filter or null if conversion not possible
      • asLong

        public static long asLong​(Object value)