public abstract class MockCatalogReader
extends org.apache.calcite.prepare.CalciteCatalogReader
SqlValidatorCatalogReader which returns tables
"EMP", "DEPT", "BONUS", "SALGRADE" (same as Oracle's SCOTT schema).
Also two streams "ORDERS", "SHIPMENTS";
and a view "EMP_20".| 限定符和类型 | 类和说明 |
|---|---|
static interface |
MockCatalogReader.ColumnResolver
Column resolver.
|
static class |
MockCatalogReader.MockDynamicTable
Mock implementation of
AbstractQueryableTable with dynamic record type. |
static class |
MockCatalogReader.MockModifiableViewRelOptTable
Alternative to MockViewTable that exercises code paths in ModifiableViewTable
and ModifiableViewTableInitializerExpressionFactory.
|
static class |
MockCatalogReader.MockRelViewTable
Mock implementation of
Prepare.AbstractPreparingTable which holds ViewTable
and delegates MockCatalogReader.MockTable.toRel(org.apache.calcite.plan.RelOptTable.ToRelContext) call to the view. |
static class |
MockCatalogReader.MockSchema
Mock schema.
|
static class |
MockCatalogReader.MockTable
Mock implementation of
Prepare.PreparingTable. |
static class |
MockCatalogReader.MockViewTable
Mock implementation of
Prepare.PreparingTable for views. |
| 限定符 | 构造器和说明 |
|---|---|
protected |
MockCatalogReader(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
boolean caseSensitive)
Creates a MockCatalogReader.
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract MockCatalogReader |
init()
Initializes this catalog reader.
|
boolean |
isCaseSensitive() |
org.apache.calcite.sql.validate.SqlNameMatcher |
nameMatcher() |
protected void |
registerSchema(MockCatalogReader.MockSchema schema) |
protected void |
registerTable(MockCatalogReader.MockTable table) |
protected void |
registerTablesWithRollUp(MockCatalogReader.MockSchema schema,
org.apache.calcite.test.catalog.Fixture f) |
protected void |
registerType(List<String> names,
org.apache.calcite.rel.type.RelProtoDataType relProtoDataType) |
createTypeFromProjection, field, getAllSchemaObjectNames, getConfig, getNamedType, getOperatorList, getRootSchema, getSchemaPaths, getTable, getTableForMember, getTypeFactory, lookupOperatorOverloads, matches, operatorTable, registerRules, unwrap, withSchemaPathprotected MockCatalogReader(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
boolean caseSensitive)
Caller must then call init() to populate with data;
constructor is protected to encourage you to define a create
method in each concrete sub-class.
typeFactory - Type factorypublic boolean isCaseSensitive()
isCaseSensitive 在接口中 org.apache.calcite.sql.validate.SqlValidatorCatalogReaderisCaseSensitive 在类中 org.apache.calcite.prepare.CalciteCatalogReaderpublic org.apache.calcite.sql.validate.SqlNameMatcher nameMatcher()
nameMatcher 在接口中 org.apache.calcite.sql.validate.SqlValidatorCatalogReadernameMatcher 在类中 org.apache.calcite.prepare.CalciteCatalogReaderpublic abstract MockCatalogReader init()
protected void registerTablesWithRollUp(MockCatalogReader.MockSchema schema, org.apache.calcite.test.catalog.Fixture f)
protected void registerType(List<String> names, org.apache.calcite.rel.type.RelProtoDataType relProtoDataType)
protected void registerTable(MockCatalogReader.MockTable table)
protected void registerSchema(MockCatalogReader.MockSchema schema)
Copyright © 2012-2023 Apache Software Foundation. All Rights Reserved.