Class ConnectByRootExpression
java.lang.Object
dev.frostlake.executor.expressions.ColumnReferenceExpression
dev.frostlake.executor.expressions.ConnectByRootExpression
- All Implemented Interfaces:
Expression
CONNECT_BY_ROOT <column>: the column's value on the ROOT row of the hierarchy branch that
produced the current row.
The CONNECT BY expansion materializes the root row's values as extra ROOT_PREFIX-prefixed
columns (hidden from SELECT *), so this is modelled as an ordinary
ColumnReferenceExpression to that prefixed name. Used in a query WITHOUT a CONNECT BY clause
the prefixed column is absent and Snowflake simply returns the column's own value (live-verified:
SELECT CONNECT_BY_ROOT nm FROM h returns every row's nm) — baseColumnReference()
is the fallback the evaluator uses for that case.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPrefix of the synthesized root-row column names produced by the CONNECT BY expansion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe plain column reference as written afterCONNECT_BY_ROOT.toString()Methods inherited from class dev.frostlake.executor.expressions.ColumnReferenceExpression
accept, describeStar, getColumnName, getPosition, getPositionalOrdinal, getStarArgument, getTableName, getWrittenName, isQualified, setWrittenName
-
Field Details
-
ROOT_PREFIX
Prefix of the synthesized root-row column names produced by the CONNECT BY expansion.- See Also:
-
-
Constructor Details
-
ConnectByRootExpression
-
-
Method Details
-
baseColumnReference
The plain column reference as written afterCONNECT_BY_ROOT. -
toString
- Overrides:
toStringin classColumnReferenceExpression
-