Package org.apache.calcite.test.catalog
Class MockCatalogReader.MockModifiableViewRelOptTable
java.lang.Object
org.apache.calcite.prepare.Prepare.AbstractPreparingTable
org.apache.calcite.test.catalog.MockCatalogReader.MockTable
org.apache.calcite.test.catalog.MockCatalogReader.MockModifiableViewRelOptTable
- All Implemented Interfaces:
RelOptTable
,Prepare.PreparingTable
,BuiltInMetadata.MaxRowCount.Handler
,MetadataHandler<BuiltInMetadata.MaxRowCount>
,Wrapper
,SqlValidatorTable
- Enclosing class:
MockCatalogReader
public static class MockCatalogReader.MockModifiableViewRelOptTable
extends MockCatalogReader.MockTable
Alternative to MockViewTable that exercises code paths in ModifiableViewTable
and ModifiableViewTableInitializerExpressionFactory.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A mock of ModifiableViewTable that can unwrap a mock RelOptTable.static class
A TableMacro that creates mock ModifiableViewTable.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.MockModifiableViewRelOptTable.MockModifiableViewTable modifiableViewTable, MockCatalogReader catalogReader, String catalogName, String schemaName, String name, boolean stream, double rowCount, @Nullable MockCatalogReader.ColumnResolver resolver) protected RelOptTable
Implementation-specific code to instantiate a newRelOptTable
based on aTable
that has been extended.Describes the type of rows returned by this table.<T> T
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.viewMacro
(CalciteSchema schema, String viewSql, List<String> schemaPath, List<String> viewPath, Boolean modifiable) Methods inherited from class org.apache.calcite.test.catalog.MockCatalogReader.MockTable
addColumn, addColumn, addMonotonic, addWrap, create, create, create, create, create, create, create, getAllowedAccess, getCollationList, getDef, getDistribution, getExpression, getKeys, getKind, getMaxRowCount, getMonotonicity, getQualifiedName, getReferentialConstraints, getRelOptSchema, getRowCount, isKey, isTemporal, onRegister, registerRolledUpColumn, setKind, supportsModality, toRel
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.MockModifiableViewRelOptTable create(MockCatalogReader.MockModifiableViewRelOptTable.MockModifiableViewTable modifiableViewTable, MockCatalogReader catalogReader, String catalogName, String schemaName, String name, boolean stream, double rowCount, @Nullable MockCatalogReader.ColumnResolver resolver) -
viewMacro
public static MockCatalogReader.MockModifiableViewRelOptTable.MockViewTableMacro viewMacro(CalciteSchema schema, String viewSql, List<String> schemaPath, List<String> viewPath, Boolean modifiable) -
getRowType
Description copied from interface:RelOptTable
Describes the type of rows returned by this table.- Specified by:
getRowType
in interfaceRelOptTable
- Specified by:
getRowType
in interfaceSqlValidatorTable
- Overrides:
getRowType
in classMockCatalogReader.MockTable
-
extend
Description copied from class:Prepare.AbstractPreparingTable
Implementation-specific code to instantiate a newRelOptTable
based on aTable
that has been extended.- Overrides:
extend
in classMockCatalogReader.MockTable
-
unwrap
Description copied from interface:Wrapper
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.- Specified by:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classMockCatalogReader.MockTable
-