Class MockCatalogReader.MockDynamicTable

  • All Implemented Interfaces:
    org.apache.calcite.schema.QueryableTable, org.apache.calcite.schema.Table, org.apache.calcite.schema.TranslatableTable, org.apache.calcite.schema.Wrapper
    Enclosing class:
    MockCatalogReader

    public static class MockCatalogReader.MockDynamicTable
    extends org.apache.calcite.adapter.java.AbstractQueryableTable
    implements org.apache.calcite.schema.TranslatableTable
    Mock implementation of AbstractQueryableTable with dynamic record type.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<java.lang.String> names  
      private org.apache.calcite.rel.type.DynamicRecordTypeImpl rowType  
      • Fields inherited from class org.apache.calcite.adapter.java.AbstractQueryableTable

        elementType
    • Constructor Summary

      Constructors 
      Constructor Description
      MockDynamicTable​(java.lang.String catalogName, java.lang.String schemaName, java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> org.apache.calcite.linq4j.Queryable<T> asQueryable​(org.apache.calcite.linq4j.QueryProvider queryProvider, org.apache.calcite.schema.SchemaPlus schema, java.lang.String tableName)  
      org.apache.calcite.rel.type.RelDataType getRowType​(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory)  
      org.apache.calcite.rel.RelNode toRel​(org.apache.calcite.plan.RelOptTable.ToRelContext context, org.apache.calcite.plan.RelOptTable relOptTable)  
      • Methods inherited from class org.apache.calcite.adapter.java.AbstractQueryableTable

        getElementType, getExpression
      • Methods inherited from class org.apache.calcite.schema.impl.AbstractTable

        getJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrap
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.calcite.schema.Table

        getJdbcTableType, getStatistic, isRolledUp, rolledUpColumnValidInsideAgg
    • Field Detail

      • rowType

        private final org.apache.calcite.rel.type.DynamicRecordTypeImpl rowType
      • names

        protected final java.util.List<java.lang.String> names
    • Constructor Detail

      • MockDynamicTable

        MockDynamicTable​(java.lang.String catalogName,
                         java.lang.String schemaName,
                         java.lang.String name)
    • Method Detail

      • getRowType

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

        public <T> org.apache.calcite.linq4j.Queryable<T> asQueryable​(org.apache.calcite.linq4j.QueryProvider queryProvider,
                                                                      org.apache.calcite.schema.SchemaPlus schema,
                                                                      java.lang.String tableName)
        Specified by:
        asQueryable in interface org.apache.calcite.schema.QueryableTable
      • toRel

        public org.apache.calcite.rel.RelNode toRel​(org.apache.calcite.plan.RelOptTable.ToRelContext context,
                                                    org.apache.calcite.plan.RelOptTable relOptTable)
        Specified by:
        toRel in interface org.apache.calcite.schema.TranslatableTable