public static interface Prepare.CatalogReader extends RelOptSchema, SqlValidatorCatalogReader, SqlOperatorTable
Modifier and Type | Field and Description |
---|---|
static java.lang.ThreadLocal<Prepare.CatalogReader> |
THREAD_LOCAL |
Modifier and Type | Method and Description |
---|---|
Prepare.PreparingTable |
getTable(java.util.List<java.lang.String> names)
Finds a table or schema with the given name, possibly qualified.
|
Prepare.PreparingTable |
getTableForMember(java.util.List<java.lang.String> names)
Retrieves a
RelOptTable based upon a member access. |
Prepare.CatalogReader |
withSchemaPath(java.util.List<java.lang.String> schemaPath)
Returns a catalog reader the same as this one but with a possibly
different schema path.
|
getTypeFactory, registerRules
createTypeFromProjection, field, getAllSchemaObjectNames, getConfig, getNamedType, getRootSchema, getSchemaPaths, isCaseSensitive, matches, nameMatcher
getOperatorList, lookupOperatorOverloads
static final java.lang.ThreadLocal<Prepare.CatalogReader> THREAD_LOCAL
Prepare.PreparingTable getTableForMember(java.util.List<java.lang.String> names)
RelOptSchema
RelOptTable
based upon a member access.
For example, the Saffron expression salesSchema.emps
would be resolved using a call to salesSchema.getTableForMember(new
String[]{"emps" })
.
Note that name.length is only greater than 1 for queries originating from JDBC.
getTableForMember
in interface RelOptSchema
names
- Qualified namePrepare.CatalogReader withSchemaPath(java.util.List<java.lang.String> schemaPath)
Prepare.PreparingTable getTable(java.util.List<java.lang.String> names)
SqlValidatorCatalogReader
Uses the case-sensitivity policy of the catalog reader.
If not found, returns null. If you want a more descriptive error
message or to override the case-sensitivity of the match, use
SqlValidatorScope.resolveTable(java.util.List<java.lang.String>, org.apache.calcite.sql.validate.SqlNameMatcher, org.apache.calcite.sql.validate.SqlValidatorScope.Path, org.apache.calcite.sql.validate.SqlValidatorScope.Resolved)
.
getTable
in interface SqlValidatorCatalogReader
names
- Name of table, may be qualified or fully-qualifiedCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.