public class JoinScope extends ListScope
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.
SqlValidatorScope.EmptyPath, SqlValidatorScope.Path, SqlValidatorScope.Resolve, SqlValidatorScope.Resolved, SqlValidatorScope.ResolvedImpl, SqlValidatorScope.Stepparent, validator| Modifier and Type | Method and Description |
|---|---|
void |
addChild(SqlValidatorNamespace ns,
String alias,
boolean nullable)
Registers a relation in this scope.
|
SqlNode |
getNode()
Returns the root node of this scope.
|
@Nullable SqlValidatorScope |
getUsingScope()
Returns the scope which is used for resolving USING clause.
|
boolean |
isWithin(@Nullable SqlValidatorScope scope2)
Returns whether this scope is enclosed within
scope2 in such
a way that it can see the contents of scope2. |
@Nullable SqlWindow |
lookupWindow(String name)
Finds a window with a given name.
|
findAliases, findAllColumnNames, findQualifyingTableName, findQualifyingTableNames, getChildren, isChildNullable, resolve, resolveColumnaddColumnNames, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, nullifyType, resolveTable, validateExprpublic SqlNode getNode()
SqlValidatorScopepublic void addChild(SqlValidatorNamespace ns, String alias, boolean nullable)
SqlValidatorScopeaddChild in interface SqlValidatorScopeaddChild in class ListScopens - 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 joinpublic @Nullable SqlWindow lookupWindow(String name)
SqlValidatorScopelookupWindow in interface SqlValidatorScopelookupWindow in class DelegatingScopepublic @Nullable SqlValidatorScope getUsingScope()
public boolean isWithin(@Nullable SqlValidatorScope scope2)
SqlValidatorScopescope2 in such
a way that it can see the contents of scope2.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.