public class ScopeBuildResult extends Object
| Constructor and Description |
|---|
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable,
Map<TTable,INamespace> tableToNamespaceMap) |
ScopeBuildResult(GlobalScope globalScope,
Map<TObjectName,IScope> columnToScopeMap,
List<TObjectName> allColumnReferences,
Map<TSelectSqlStatement,SelectScope> statementScopeMap,
Map<TObjectName,TTable> usingColumnToRightTable,
Map<TObjectName,TTable> usingColumnToLeftTable,
Map<TTable,INamespace> tableToNamespaceMap,
Set<TTable> ctasTargetTables) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumnReferences(List<TObjectName> columns)
Add column references to the internal list.
|
String |
dumpColumnReferences()
Dump all column references for debugging
|
String |
dumpScopeTree()
Dump scope tree for debugging
|
List<TObjectName> |
getAllColumnReferences() |
Map<TObjectName,IScope> |
getColumnToScopeMap() |
Set<TTable> |
getCTASTargetTables()
Get all CTAS target tables
|
Map<String,CTENamespace> |
getCTENamespaces()
Get all CTENamespaces from the scope tree.
|
GlobalScope |
getGlobalScope() |
INamespace |
getNamespaceForTable(TTable table)
Get the namespace for a specific table.
|
List<PivotNamespace> |
getPivotNamespaces()
Get all PivotNamespaces from the scope tree.
|
IScope |
getScopeForColumn(TObjectName column)
Get the scope for a specific column reference
|
SelectScope |
getScopeForStatement(TSelectSqlStatement stmt)
Get the SelectScope for a specific statement
|
Map<TSelectSqlStatement,SelectScope> |
getStatementScopeMap() |
String |
getStatistics()
Get statistics about the build result
|
Map<TTable,INamespace> |
getTableToNamespaceMap()
Get all TTable -> INamespace mappings
|
TTable |
getUsingColumnLeftTable(TObjectName column)
Get the left-side table for a USING column.
|
TTable |
getUsingColumnRightTable(TObjectName column)
Get the right-side table for a USING column.
|
Map<TObjectName,TTable> |
getUsingColumnToLeftTable()
Get all USING column -> left-side table mappings
|
Map<TObjectName,TTable> |
getUsingColumnToRightTable()
Get all USING column -> right-side table mappings
|
boolean |
isCTASTargetTable(TTable table)
Check if a table is a CTAS target table (table being created by CREATE TABLE AS SELECT).
|
String |
toString() |
public ScopeBuildResult(GlobalScope globalScope, Map<TObjectName,IScope> columnToScopeMap, List<TObjectName> allColumnReferences, Map<TSelectSqlStatement,SelectScope> statementScopeMap, Map<TObjectName,TTable> usingColumnToRightTable)
public ScopeBuildResult(GlobalScope globalScope, Map<TObjectName,IScope> columnToScopeMap, List<TObjectName> allColumnReferences, Map<TSelectSqlStatement,SelectScope> statementScopeMap, Map<TObjectName,TTable> usingColumnToRightTable, Map<TObjectName,TTable> usingColumnToLeftTable)
public ScopeBuildResult(GlobalScope globalScope, Map<TObjectName,IScope> columnToScopeMap, List<TObjectName> allColumnReferences, Map<TSelectSqlStatement,SelectScope> statementScopeMap, Map<TObjectName,TTable> usingColumnToRightTable, Map<TObjectName,TTable> usingColumnToLeftTable, Map<TTable,INamespace> tableToNamespaceMap)
public ScopeBuildResult(GlobalScope globalScope, Map<TObjectName,IScope> columnToScopeMap, List<TObjectName> allColumnReferences, Map<TSelectSqlStatement,SelectScope> statementScopeMap, Map<TObjectName,TTable> usingColumnToRightTable, Map<TObjectName,TTable> usingColumnToLeftTable, Map<TTable,INamespace> tableToNamespaceMap, Set<TTable> ctasTargetTables)
public GlobalScope getGlobalScope()
public Map<TObjectName,IScope> getColumnToScopeMap()
public List<TObjectName> getAllColumnReferences()
public void addColumnReferences(List<TObjectName> columns)
columns - the column references to addpublic Map<TSelectSqlStatement,SelectScope> getStatementScopeMap()
public IScope getScopeForColumn(TObjectName column)
public SelectScope getScopeForStatement(TSelectSqlStatement stmt)
public TTable getUsingColumnRightTable(TObjectName column)
column - the USING column TObjectNamepublic Map<TObjectName,TTable> getUsingColumnToRightTable()
public TTable getUsingColumnLeftTable(TObjectName column)
column - the USING column TObjectNamepublic Map<TObjectName,TTable> getUsingColumnToLeftTable()
public INamespace getNamespaceForTable(TTable table)
table - the TTable to look uppublic Map<TTable,INamespace> getTableToNamespaceMap()
public boolean isCTASTargetTable(TTable table)
table - the TTable to checkpublic Set<TTable> getCTASTargetTables()
public Map<String,CTENamespace> getCTENamespaces()
public List<PivotNamespace> getPivotNamespaces()
public String getStatistics()
public String dumpScopeTree()
public String dumpColumnReferences()