Class AvroFilterableTable

  • All Implemented Interfaces:
    org.apache.calcite.schema.FilterableTable, org.apache.calcite.schema.Table

    public final class AvroFilterableTable
    extends Object
    implements org.apache.calcite.schema.FilterableTable
    An avro table when the data is provided by the provided Supplier of CloseableIterable of IndexedRecord
    Author:
    Zoltan Farkas
    • Constructor Summary

      Constructors 
      Constructor Description
      AvroFilterableTable​(org.apache.avro.Schema componentType, Supplier<org.spf4j.base.CloseableIterator<? extends org.apache.avro.generic.IndexedRecord>> dataSupplier)  
    • Constructor Detail

      • AvroFilterableTable

        public AvroFilterableTable​(org.apache.avro.Schema componentType,
                                   Supplier<org.spf4j.base.CloseableIterator<? extends org.apache.avro.generic.IndexedRecord>> dataSupplier)
    • Method Detail

      • scan

        public org.apache.calcite.linq4j.Enumerable<Object[]> scan​(org.apache.calcite.DataContext root,
                                                                   List<org.apache.calcite.rex.RexNode> filters)
        Specified by:
        scan in interface org.apache.calcite.schema.FilterableTable
      • getRowType

        public final org.apache.calcite.rel.type.RelDataType getRowType​(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)
        Specified by:
        getRowType in interface org.apache.calcite.schema.Table
      • getStatistic

        @Nonnull
        public org.apache.calcite.schema.Statistic getStatistic()
        Overwrite for better statistics.
        Specified by:
        getStatistic in interface org.apache.calcite.schema.Table
        Returns:
      • getJdbcTableType

        public final org.apache.calcite.schema.Schema.TableType getJdbcTableType()
        Specified by:
        getJdbcTableType in interface org.apache.calcite.schema.Table
      • isRolledUp

        public final boolean isRolledUp​(String column)
        Specified by:
        isRolledUp in interface org.apache.calcite.schema.Table
      • rolledUpColumnValidInsideAgg

        public final boolean rolledUpColumnValidInsideAgg​(String column,
                                                          org.apache.calcite.sql.SqlCall call,
                                                          org.apache.calcite.sql.SqlNode parent,
                                                          org.apache.calcite.config.CalciteConnectionConfig config)
        Specified by:
        rolledUpColumnValidInsideAgg in interface org.apache.calcite.schema.Table
      • getComponentType

        public final org.apache.avro.Schema getComponentType()