public final class ColumnRef extends Object
RelationSource's
RelationBinding so that
later CTE/subquery slices can describe provenance separately without
mutating this shape.
An optional StructuredColumnPath carries a typed path into a
structured column (e.g. nodes[*].key) produced by a
structured-dataflow adapter such as Spark from_json+explode.
Existing constructors leave it null for full backward compatibility.
Join-analysis slice 164 (S3) adds an optional SourceSpan
pointing at the source-text reference this column was read from; slice
165 (S4) adds an optional ColumnResolution surfacing the
resolved base relation (GAP 5). Both are excluded from
equals(java.lang.Object)/hashCode() so that set/map dedupe and golden
ordering are unaffected — two refs that differ only in span or
resolution remain equal. Existing constructors default them to
null.
| Constructor and Description |
|---|
ColumnRef(String relationAlias,
String columnName) |
ColumnRef(String relationAlias,
String columnName,
StructuredColumnPath structuredPath) |
ColumnRef(String relationAlias,
String columnName,
StructuredColumnPath structuredPath,
SourceSpan sourceSpan)
Slice 164 — adds the optional source span.
|
ColumnRef(String relationAlias,
String columnName,
StructuredColumnPath structuredPath,
SourceSpan sourceSpan,
ColumnResolution resolution)
Full constructor (join-analysis slice 165).
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getColumnName() |
String |
getRelationAlias() |
ColumnResolution |
getResolution()
Optional resolution of this column to its base relation / final
table (join-analysis slice 165, GAP 5).
|
SourceSpan |
getSourceSpan()
Optional source-text span of this column reference (join-analysis
slice 164).
|
StructuredColumnPath |
getStructuredPath() |
int |
hashCode() |
String |
toString() |
public ColumnRef(String relationAlias, String columnName, StructuredColumnPath structuredPath)
public ColumnRef(String relationAlias, String columnName, StructuredColumnPath structuredPath, SourceSpan sourceSpan)
public ColumnRef(String relationAlias, String columnName, StructuredColumnPath structuredPath, SourceSpan sourceSpan, ColumnResolution resolution)
sourceSpan and
resolution are optional (null when the parser cannot anchor
the reference / when no resolution was attempted) and both are
excluded from identity.public String getRelationAlias()
public String getColumnName()
public StructuredColumnPath getStructuredPath()
public SourceSpan getSourceSpan()
equals(java.lang.Object)/hashCode().public ColumnResolution getResolution()
ColumnResolution (RESOLVED with a final-table name,
or UNRESOLVED). Excluded from equals(java.lang.Object)/hashCode().