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 TypeMethodDescriptionvoid
addChild
(SqlValidatorNamespace ns, String alias, boolean nullable) Registers a relation in this scope.getNode()
Returns the root node of this scope.@Nullable SqlValidatorScope
Returns the scope which is used for resolving USING clause.boolean
isWithin
(SqlValidatorScope scope2) Returns whether this scope is enclosed withinscope2
in such a way that it can see the contents ofscope2
.@Nullable SqlWindow
lookupWindow
(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, resolveColumn
Methods inherited from class org.apache.calcite.sql.validate.DelegatingScope
addColumnNames, analyze, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, nullifyType, qualifyUsingAlias, resolveTable, validateExpr
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.sql.validate.SqlValidatorScope
isMeasureRef
-
Method Details
-
getNode
Description copied from interface:SqlValidatorScope
Returns the root node of this scope. Never null. -
addChild
Description copied from interface:SqlValidatorScope
Registers a relation in this scope.- Specified by:
addChild
in interfaceSqlValidatorScope
- Overrides:
addChild
in 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:SqlValidatorScope
Finds a window with a given name. Returns null if not found.- Specified by:
lookupWindow
in interfaceSqlValidatorScope
- Overrides:
lookupWindow
in classDelegatingScope
-
getUsingScope
Returns the scope which is used for resolving USING clause. -
isWithin
Description copied from interface:SqlValidatorScope
Returns whether this scope is enclosed withinscope2
in such a way that it can see the contents ofscope2
.
-