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.Step| Modifier and Type | Field and Description |
|---|---|
private SqlJoin |
join |
private SqlValidatorScope |
usingScope |
parent, validator| Constructor and Description |
|---|
JoinScope(SqlValidatorScope parent,
SqlValidatorScope usingScope,
SqlJoin join)
Creates a
JoinScope. |
| 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.
|
SqlValidatorScope |
getUsingScope()
Returns the scope which is used for resolving USING clause.
|
SqlWindow |
lookupWindow(String name)
Finds a window with a given name.
|
findAliases, findAllColumnNames, findQualifyingTableName, findQualifyingTableNames, getChildNames, getChildren, resolve, resolveColumnaddColumnNames, fullyQualify, getMonotonicity, getOperandScope, getOrderList, getParent, getTableNamespace, getValidator, nullifyType, resolveInNamespace, resolveTable, validateExprprivate final SqlValidatorScope usingScope
private final SqlJoin join
JoinScope(SqlValidatorScope parent, SqlValidatorScope usingScope, SqlJoin join)
JoinScope.parent - Parent scopeusingScope - Scope for resolving USING clausejoin - Call to JOIN operatorpublic 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 SqlWindow lookupWindow(String name)
SqlValidatorScopelookupWindow in interface SqlValidatorScopelookupWindow in class DelegatingScopepublic SqlValidatorScope getUsingScope()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.