Package org.apache.calcite.test.catalog
Class MockCatalogReader.MustFilterMockTable
java.lang.Object
org.apache.calcite.prepare.Prepare.AbstractPreparingTable
org.apache.calcite.test.catalog.MockCatalogReader.MockTable
org.apache.calcite.test.catalog.MockCatalogReader.MustFilterMockTable
- All Implemented Interfaces:
RelOptTable,Prepare.PreparingTable,BuiltInMetadata.MaxRowCount.Handler,MetadataHandler<BuiltInMetadata.MaxRowCount>,Wrapper,SemanticTable,SqlValidatorTable
- Enclosing class:
MockCatalogReader
public static class MockCatalogReader.MustFilterMockTable
extends MockCatalogReader.MockTable
implements SemanticTable
Mock implementation of
MockCatalogReader.MockTable that supports must-filter fields.
Must-filter fields are declared via methods in the SemanticTable
interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.plan.RelOptTable
RelOptTable.ToRelContext, RelOptTable.ViewExpander -
Field Summary
Fields inherited from class org.apache.calcite.test.catalog.MockCatalogReader.MockTable
catalogReader, collationList, columnList, initializerFactory, keyList, kind, maxRowCount, monotonicColumnSet, names, referentialConstraints, resolver, rolledUpColumns, rowCount, rowType, stream, wraps -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of column ordinals (0-based) of fields that defuse must-filter columns when filtered on.create(MockCatalogReader catalogReader, MockCatalogReader.MockSchema schema, String name, boolean stream, double rowCount, @Nullable MockCatalogReader.ColumnResolver resolver, InitializerExpressionFactory initializerExpressionFactory, boolean temporal, Map<String, String> fieldFilters, List<Integer> bypassFieldList) Creates a MustFilterMockTable.@Nullable StringgetFilter(int column) Returns the filter expression forcolumnif it is amust-filtercolumn, or null if it is not a must-filter column.booleanmustFilter(int column) Returns whethercolumnmust be filtered in any query that references this table.Methods inherited from class org.apache.calcite.test.catalog.MockCatalogReader.MockTable
addColumn, addColumn, addKey, addKey, addMonotonic, addWrap, create, create, create, create, create, create, create, extend, getAllowedAccess, getCollationList, getDef, getDistribution, getExpression, getKeys, getKind, getMaxRowCount, getMonotonicity, getQualifiedName, getReferentialConstraints, getRelOptSchema, getRowCount, getRowType, isKey, isTemporal, onRegister, registerRolledUpColumn, setKind, supportsModality, toRel, unwrapMethods inherited from class org.apache.calcite.prepare.Prepare.AbstractPreparingTable
columnHasDefaultValue, extend, getColumnStrategiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.sql.validate.SqlValidatorTable
tableMethods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Method Details
-
create
public static MockCatalogReader.MustFilterMockTable create(MockCatalogReader catalogReader, MockCatalogReader.MockSchema schema, String name, boolean stream, double rowCount, @Nullable MockCatalogReader.ColumnResolver resolver, InitializerExpressionFactory initializerExpressionFactory, boolean temporal, Map<String, String> fieldFilters, List<Integer> bypassFieldList) Creates a MustFilterMockTable. -
getFilter
Description copied from interface:SemanticTableReturns the filter expression forcolumnif it is amust-filtercolumn, or null if it is not a must-filter column.- Specified by:
getFilterin interfaceSemanticTable- Parameters:
column- Column ordinal (0-based)
-
mustFilter
public boolean mustFilter(int column) Description copied from interface:SemanticTableReturns whethercolumnmust be filtered in any query that references this table.- Specified by:
mustFilterin interfaceSemanticTable- Parameters:
column- Column ordinal (0-based)
-
bypassFieldList
Description copied from interface:SemanticTableReturns a list of column ordinals (0-based) of fields that defuse must-filter columns when filtered on.- Specified by:
bypassFieldListin interfaceSemanticTable
-