Package org.apache.calcite.sql.validate
Class DelegatingSqlValidatorCatalogReader
java.lang.Object
org.apache.calcite.sql.validate.DelegatingSqlValidatorCatalogReader
- All Implemented Interfaces:
Wrapper,SqlValidatorCatalogReader
public abstract class DelegatingSqlValidatorCatalogReader
extends Object
implements SqlValidatorCatalogReader
Implementation of
SqlValidatorCatalogReader that passes
all calls to a parent catalog reader.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDelegatingSqlValidatorCatalogReader(SqlValidatorCatalogReader catalogReader) Creates a DelegatingSqlValidatorCatalogReader. -
Method Summary
Modifier and TypeMethodDescriptiongetAllSchemaObjectNames(List<String> names) Given fully qualified schema name, returns schema object names as specified.@Nullable RelDataTypegetNamedType(SqlIdentifier typeName) Finds a user-defined type with the given name, possibly qualified.Returns the paths of all schemas to look in for tables.@Nullable SqlValidatorTableFinds a table or schema with the given name, possibly qualified.<C> @Nullable CFinds an instance of an interface implemented by this object, or returns null if this object does not support that interface.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.sql.validate.SqlValidatorCatalogReader
createTypeFromProjection, field, getConfig, getRootSchema, isCaseSensitive, matches, nameMatcherMethods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Field Details
-
catalogReader
-
-
Constructor Details
-
DelegatingSqlValidatorCatalogReader
Creates a DelegatingSqlValidatorCatalogReader.- Parameters:
catalogReader- Parent catalog reader
-
-
Method Details
-
getTable
Description copied from interface:SqlValidatorCatalogReaderFinds a table or schema with the given name, possibly qualified.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).- Specified by:
getTablein interfaceSqlValidatorCatalogReader- Parameters:
names- Name of table, may be qualified or fully-qualified- Returns:
- Table with the given name, or null
-
getNamedType
Description copied from interface:SqlValidatorCatalogReaderFinds a user-defined type with the given name, possibly qualified.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.
- Specified by:
getNamedTypein interfaceSqlValidatorCatalogReader- Parameters:
typeName- Name of type- Returns:
- named type, or null if not found
-
getAllSchemaObjectNames
Description copied from interface:SqlValidatorCatalogReaderGiven fully qualified schema name, returns schema object names as specified. They can be schema, table, function, view. When names array is empty, the contents of root schema should be returned.- Specified by:
getAllSchemaObjectNamesin interfaceSqlValidatorCatalogReader- Parameters:
names- the array contains fully qualified schema name or empty list for root schema- Returns:
- the list of all object (schema, table, function, view) names under the above criteria
-
getSchemaPaths
Description copied from interface:SqlValidatorCatalogReaderReturns the paths of all schemas to look in for tables.- Specified by:
getSchemaPathsin interfaceSqlValidatorCatalogReader- Returns:
- paths of current schema and root schema
-
unwrap
Description copied from interface:WrapperFinds an instance of an interface implemented by this object, or returns null if this object does not support that interface.
-