public final class NestedAccessNormalizer extends Object
The input is the name's NestedAccessSyntax (what the parse wrote) and what TSQLResolver2 proved about it
(where the column ends). The steps after the identifier chain come from the name's indirection, which carries every
parse shape: the Databricks and Trino-family grammars write it directly, BigQuery's subscript expression and the
Hive/Impala expression chain record their steps on it. A subscript is first a
StructuredPathSegmentKind.SUBSCRIPT step and is refined by the dialect's
NestedAccessProfile.SubscriptRule.
| Modifier and Type | Method and Description |
|---|---|
static NestedAccess |
normalize(TObjectName name)
The nested read or write
name denotes, or null when it reads a whole column. |
static NestedAccess |
normalizeStar(TObjectName name)
The STRUCT column or field whose fields a wildcard below it reads (
customer.*,
e.payload.*), as a path ending with a STAR step; null when the name is not a wildcard below a column. |
static StructuredColumnPath |
withoutStar(StructuredColumnPath path)
The path without its trailing STAR step: the column or field a wildcard expands.
|
public static NestedAccess normalize(TObjectName name)
name denotes, or null when it reads a whole column.name - a column referencepublic static NestedAccess normalizeStar(TObjectName name)
customer.*,
e.payload.*), as a path ending with a STAR step; null when the name is not a wildcard below a column.public static StructuredColumnPath withoutStar(StructuredColumnPath path)