public class LateralViewNamespace extends AbstractNamespace
lv in
FROM events LATERAL VIEW explode(items) lv AS item, with the columns its column aliases name, item.
A reference to one of them, lv.item, item or a field of it, lv.item.name, resolves to this
relation (Mantis 4845). The parser gives the LATERAL VIEW a table of type ETableSource.lateralView that
shares its alias clause (TLateralView.createATable).columnSources, columnSourcesWithRefs, guessColumnStrategy, nameMatcher, node, referenceTraceabilityEnabled, validated| Constructor and Description |
|---|
LateralViewNamespace(TTable table,
String alias,
TObjectNameList columns,
INameMatcher nameMatcher)
columns: the LATERAL VIEW's column aliases, item in lv AS item; null for none. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doValidate()
Subclasses override this to perform actual validation logic.
|
List<TTable> |
getAllFinalTables()
Get all final physical tables this namespace depends on.
|
String |
getDisplayName()
Get a display name for this namespace (for debugging/error messages)
|
TTable |
getFinalTable()
Get the final physical table this namespace represents.
|
TTable |
getSourceTable()
The LATERAL VIEW's own table: the source table of a column resolved through it.
|
TTable |
getTable() |
ColumnLevel |
hasColumn(String columnName)
Check if a column exists in this namespace.
|
boolean |
hasStarColumn()
Check if this namespace contains a star column (SELECT *).
|
ColumnSource |
resolveColumn(String columnName)
Resolve a column name to its source.
|
boolean |
supportsDynamicInference()
Check if this namespace supports dynamic column inference.
|
String |
toString() |
addColumnSource, addColumnSource, containsColumnByMatcher, containsColumnNameByMatcher, enableReferenceTraceability, ensureValidated, findColumnKeyByMatcher, getAllColumnSources, getAllUniqueColumns, getColumnReferences, getColumnSourceWithReferences, getGuessColumnStrategy, getNameMatcher, getNode, isReferenceTraceabilityEnabled, isValidated, noteColumnSourceAdded, setGuessColumnStrategy, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddInferredColumn, getInferredColumns, getMetadataState, getSelectStatement, getStarColumn, hasAuthoritativeOutputColumn, resolveColumnPathpublic LateralViewNamespace(TTable table, String alias, TObjectNameList columns, INameMatcher nameMatcher)
columns: the LATERAL VIEW's column aliases, item in lv AS item; null for none.public String getDisplayName()
INamespacepublic TTable getFinalTable()
INamespacepublic List<TTable> getAllFinalTables()
INamespacegetAllFinalTables in interface INamespacegetAllFinalTables in class AbstractNamespaceprotected void doValidate()
AbstractNamespacedoValidate in class AbstractNamespacepublic boolean hasStarColumn()
INamespacepublic boolean supportsDynamicInference()
INamespacepublic ColumnLevel hasColumn(String columnName)
INamespacehasColumn in interface INamespacehasColumn in class AbstractNamespacecolumnName - Column name to checkpublic ColumnSource resolveColumn(String columnName)
INamespaceresolveColumn in interface INamespaceresolveColumn in class AbstractNamespacecolumnName - Column name to resolvepublic TTable getSourceTable()
public String toString()
toString in class AbstractNamespace