public interface SqlValidatorCatalogReader extends Wrapper
SqlValidator
.
This interface only provides a thin API to the underlying repository, and this is intentional. By only presenting the repository information of interest to the validator, we reduce the dependency on exact mechanism to implement the repository. It is also possible to construct mock implementations of this interface for testing purposes.
Modifier and Type | Method and Description |
---|---|
RelDataType |
createTypeFromProjection(RelDataType type,
java.util.List<java.lang.String> columnNameList) |
RelDataTypeField |
field(RelDataType rowType,
java.lang.String alias)
Deprecated.
|
java.util.List<SqlMoniker> |
getAllSchemaObjectNames(java.util.List<java.lang.String> names)
Given fully qualified schema name, returns schema object names as
specified.
|
CalciteConnectionConfig |
getConfig()
Returns Config settings
|
RelDataType |
getNamedType(SqlIdentifier typeName)
Finds a user-defined type with the given name, possibly qualified.
|
CalciteSchema |
getRootSchema()
Returns the root namespace for name resolution.
|
java.util.List<java.util.List<java.lang.String>> |
getSchemaPaths()
Returns the paths of all schemas to look in for tables.
|
SqlValidatorTable |
getTable(java.util.List<java.lang.String> names)
Finds a table or schema with the given name, possibly qualified.
|
boolean |
isCaseSensitive()
Deprecated.
|
boolean |
matches(java.lang.String string,
java.lang.String name)
Deprecated.
|
SqlNameMatcher |
nameMatcher()
Returns an implementation of
SqlNameMatcher
that matches the case-sensitivity policy. |
SqlValidatorTable getTable(java.util.List<java.lang.String> names)
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)
.
names
- Name of table, may be qualified or fully-qualifiedRelDataType getNamedType(SqlIdentifier typeName)
NOTE jvs 12-Feb-2005: the reason this method is defined here instead of on RelDataTypeFactory is that it has to take into account context-dependent information such as SQL schema path, whereas a type factory is context-independent.
typeName
- Name of typejava.util.List<SqlMoniker> getAllSchemaObjectNames(java.util.List<java.lang.String> names)
names
- the array contains fully qualified schema name or empty
list for root schemajava.util.List<java.util.List<java.lang.String>> getSchemaPaths()
@Deprecated RelDataTypeField field(RelDataType rowType, java.lang.String alias)
nameMatcher()
.SqlNameMatcher.field(RelDataType, String)
SqlNameMatcher nameMatcher()
SqlNameMatcher
that matches the case-sensitivity policy.@Deprecated boolean matches(java.lang.String string, java.lang.String name)
nameMatcher()
.SqlNameMatcher.matches(String, String)
RelDataType createTypeFromProjection(RelDataType type, java.util.List<java.lang.String> columnNameList)
@Deprecated boolean isCaseSensitive()
nameMatcher()
.SqlNameMatcher.isCaseSensitive()
CalciteSchema getRootSchema()
CalciteConnectionConfig getConfig()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.