Package org.apache.calcite.sql.validate
Class JoinScope
java.lang.Object
org.apache.calcite.sql.validate.DelegatingScope
org.apache.calcite.sql.validate.ListScope
org.apache.calcite.sql.validate.JoinScope
- All Implemented Interfaces:
SqlValidatorScope
The name-resolution context for expression inside a JOIN clause. The objects
visible are the joined table expressions, and those inherited from the parent
scope.
Consider "SELECT * FROM (A JOIN B ON {exp1}) JOIN C ON {exp2}". {exp1} is resolved in the join scope for "A JOIN B", which contains A and B but not C.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.sql.validate.SqlValidatorScope
SqlValidatorScope.EmptyPath, SqlValidatorScope.Path, SqlValidatorScope.Resolve, SqlValidatorScope.Resolved, SqlValidatorScope.ResolvedImpl, SqlValidatorScope.Step -
Field Summary
Fields inherited from class org.apache.calcite.sql.validate.DelegatingScope
parent, resolved, validator -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(SqlValidatorNamespace ns, String alias, boolean nullable) Registers a relation in this scope.getNode()Returns the root node of this scope.@Nullable SqlValidatorScopeReturns the scope which is used for resolving USING clause.booleanisWithin(SqlValidatorScope scope2) Returns whether this scope is enclosed withinscope2in such a way that it can see the contents ofscope2.@Nullable SqlWindowlookupWindow(String name) Finds a window with a given name.Methods inherited from class org.apache.calcite.sql.validate.ListScope
findAliases, findAllColumnNames, findQualifyingTableName, findQualifyingTableNames, getChildren, isChildNullable, resolve, resolveColumnMethods inherited from class org.apache.calcite.sql.validate.DelegatingScope
addColumnNames, analyze, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, nullifyType, qualifyUsingAlias, resolveTable, validateExprMethods 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.SqlValidatorScope
isMeasureRef
-
Method Details
-
getNode
Description copied from interface:SqlValidatorScopeReturns the root node of this scope. Never null. -
addChild
Description copied from interface:SqlValidatorScopeRegisters a relation in this scope.- Specified by:
addChildin interfaceSqlValidatorScope- Overrides:
addChildin classListScope- Parameters:
ns- Namespace representing the result-columns of the relationalias- Alias with which to reference the relation, must not be nullnullable- Whether this is a null-generating side of a join
-
lookupWindow
Description copied from interface:SqlValidatorScopeFinds a window with a given name. Returns null if not found.- Specified by:
lookupWindowin interfaceSqlValidatorScope- Overrides:
lookupWindowin classDelegatingScope
-
getUsingScope
Returns the scope which is used for resolving USING clause. -
isWithin
Description copied from interface:SqlValidatorScopeReturns whether this scope is enclosed withinscope2in such a way that it can see the contents ofscope2.
-