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 TypeMethodDescriptioncreate
(MockCatalogReader catalogReader, MockCatalogReader.MockSchema schema, String name, boolean stream, double rowCount, @Nullable MockCatalogReader.ColumnResolver resolver, InitializerExpressionFactory initializerExpressionFactory, boolean temporal, Map<String, String> fieldFilters) Creates a MustFilterMockTable.@Nullable String
getFilter
(int column) Returns the filter expression forcolumn
if it is amust-filter
column, or null if it is not a must-filter column.boolean
mustFilter
(int column) Returns whethercolumn
must be filtered in any query that references this table.Methods inherited from class org.apache.calcite.test.catalog.MockCatalogReader.MockTable
addColumn, addColumn, 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, unwrap
Methods inherited from class org.apache.calcite.prepare.Prepare.AbstractPreparingTable
columnHasDefaultValue, extend, getColumnStrategies
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.sql.validate.SqlValidatorTable
table
Methods 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) Creates a MustFilterMockTable. -
getFilter
Description copied from interface:SemanticTable
Returns the filter expression forcolumn
if it is amust-filter
column, or null if it is not a must-filter column.- Specified by:
getFilter
in interfaceSemanticTable
- Parameters:
column
- Column ordinal (0-based)
-
mustFilter
public boolean mustFilter(int column) Description copied from interface:SemanticTable
Returns whethercolumn
must be filtered in any query that references this table.- Specified by:
mustFilter
in interfaceSemanticTable
- Parameters:
column
- Column ordinal (0-based)
-