public final class LeftOfFromScope extends FromScope
bound: what the inputs of a
table-generating relation such as a Hive-family LATERAL VIEW may read (nested-access plan section 4.3). It filters
the live FROM scope when asked, by the statement's tables in source order, so it sees every relation to the left
whatever order the scope builder added them in, and never one added to the right of bound.childrennode, parent, scopeType| Constructor and Description |
|---|
LeftOfFromScope(IScope parent,
FromScope live,
List<TTable> sourceOrder,
TTable bound) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(INamespace namespace,
String alias,
boolean nullable)
Default implementation: not supported (most scopes don't have children)
|
List<ScopeChild> |
getChildren()
Default implementation: empty list
|
List<INamespace> |
getVisibleNamespaces()
The namespaces a name in this scope can see: the scope's own, then those of its lookup parent, as
AbstractScope.resolve(java.util.List<java.lang.String>, gudusoft.gsqlparser.resolver2.matcher.INameMatcher, boolean, gudusoft.gsqlparser.resolver2.scope.IResolved) walks them. |
INamespace |
resolveTable(String tableName)
Default implementation: delegate to parent
|
resolve, resolveInNamespace, toStringaddAllDistinct, addOwnNamespaces, fullyQualify, getLookupParent, getNode, getParent, getScopeType, isWithin, setLookupParentpublic LeftOfFromScope(IScope parent, FromScope live, List<TTable> sourceOrder, TTable bound)
parent - the scope a name not found here is looked up inlive - the FROM scope of the statementsourceOrder - the statement's tables in source order (TCustomSqlStatement.tables)bound - the relation whose left side this scope ispublic List<ScopeChild> getChildren()
AbstractScopegetChildren in interface IScopegetChildren in class ListBasedScopepublic void addChild(INamespace namespace, String alias, boolean nullable)
AbstractScopeaddChild in interface IScopeaddChild in class ListBasedScopenamespace - The namespace to addalias - The alias for this namespacenullable - Whether this namespace is nullable (e.g., RIGHT side of LEFT JOIN)public INamespace resolveTable(String tableName)
AbstractScoperesolveTable in interface IScoperesolveTable in class ListBasedScopetableName - Table name or aliaspublic List<INamespace> getVisibleNamespaces()
AbstractScopeAbstractScope.resolve(java.util.List<java.lang.String>, gudusoft.gsqlparser.resolver2.matcher.INameMatcher, boolean, gudusoft.gsqlparser.resolver2.scope.IResolved) walks them. A non-lateral derived table or CTE body hides its owner's FROM scope by a
lookup parent (ScopeBuilder.setLookupParent), so the structural parent is not followed here either
(Mantis 4820, Codex review).getVisibleNamespaces in interface IScopegetVisibleNamespaces in class ListBasedScope