public final class NestedAccessProfile extends Object
EDbVendor values, so adding a dialect is one
entry here (docs/refactor/nested_column_access_unification_plan.md, section 4.6).
A Trino analysis parses with the Presto grammar, so its nodes carry EDbVendor.dbvpresto while the analysis
vendor is EDbVendor.dbvtrino; every axis gives the two the same answer except usesPrestoUnnestPath(),
which is asked with the analysis vendor.
| Modifier and Type | Class and Description |
|---|---|
static class |
NestedAccessProfile.AccessShape
The parse shapes a nested read takes in a dialect's grammar (plan section 3, gap G1).
|
static class |
NestedAccessProfile.DeclaredTypeSyntax
How a column's DDL declares a nested type.
|
static class |
NestedAccessProfile.SubscriptRule
Which element a bare subscript (
items[1]) of a column of unknown type reads. |
static class |
NestedAccessProfile.UnnestExpansion
What a table-generating construct of the dialect produces from an array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
buildsDeclaredTree()
Lineage models a column with a declared STRUCT, ARRAY or MAP type as a tree of field nodes.
|
static NestedAccessProfile |
forVendor(EDbVendor vendor)
The profile of
vendor; a null vendor gets the profile of a dialect without nested access. |
Set<NestedAccessProfile.AccessShape> |
getAccessShapes() |
NestedAccessProfile.DeclaredTypeSyntax |
getDeclaredTypeSyntax() |
NestedAccessProfile.SubscriptRule |
getSubscriptRule()
Which node a subscript of a column of unknown type reads; see
NestedAccessProfile.SubscriptRule. |
NestedAccessProfile.UnnestExpansion |
getUnnestExpansion() |
EDbVendor |
getVendor() |
boolean |
hasNamedStructConstructor()
named_struct('a', x, ...) builds a STRUCT: Hive, Spark SQL, Databricks. |
boolean |
hasRowCastConstructor()
CAST(ROW(...) AS ROW(a T, ...)) builds a STRUCT with named fields: the tree dialects but BigQuery. |
boolean |
isStructFieldVendor()
resolver2 reads a two-part name whose head is no relation as a column with a field: BigQuery, Snowflake.
|
boolean |
isTrinoFamily()
Athena, Presto, Trino: one grammar, Trino's name-reading rule (Mantis 4811, 4822).
|
boolean |
publishesPropertyNames()
Lineage names a field read of a flat column by its whole dotted path: BigQuery, Redshift (legacy naming).
|
boolean |
readsAttributePaths()
An attribute path after a relation-qualified column (
o.customer.address.city): Redshift, Oracle. |
boolean |
readsFieldChains()
A dotted name is read by what its qualifiers name: a qualifier that names a relation in scope is that
relation, otherwise the first part is a column and every later part a field (the Trino family; Hive, Spark
SQL, Databricks since Mantis 4821).
|
boolean |
usesPrestoUnnestPath()
Presto's own UNNEST analysis, kept as a compatibility adapter: asked with the analysis vendor, true for
EDbVendor.dbvpresto only (a Trino or Athena analysis uses the positional-expansion path). |
public static NestedAccessProfile forVendor(EDbVendor vendor)
vendor; a null vendor gets the profile of a dialect without nested access.public boolean isTrinoFamily()
public boolean readsFieldChains()
public boolean isStructFieldVendor()
public boolean readsAttributePaths()
o.customer.address.city): Redshift, Oracle.public boolean publishesPropertyNames()
public boolean buildsDeclaredTree()
public NestedAccessProfile.SubscriptRule getSubscriptRule()
NestedAccessProfile.SubscriptRule.public NestedAccessProfile.UnnestExpansion getUnnestExpansion()
public boolean usesPrestoUnnestPath()
EDbVendor.dbvpresto only (a Trino or Athena analysis uses the positional-expansion path).public boolean hasNamedStructConstructor()
named_struct('a', x, ...) builds a STRUCT: Hive, Spark SQL, Databricks.public boolean hasRowCastConstructor()
CAST(ROW(...) AS ROW(a T, ...)) builds a STRUCT with named fields: the tree dialects but BigQuery.public NestedAccessProfile.DeclaredTypeSyntax getDeclaredTypeSyntax()
public Set<NestedAccessProfile.AccessShape> getAccessShapes()