Skip to content

Commit 221b9dc

Browse files
committed
extract support_period_map_access_key config
1 parent 724a1d1 commit 221b9dc

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

src/dialect/bigquery.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@ impl Dialect for BigQueryDialect {
7272
fn require_interval_qualifier(&self) -> bool {
7373
true
7474
}
75+
76+
fn support_period_map_access_key(&self) -> bool {
77+
true
78+
}
7579
}

src/dialect/duckdb.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,9 @@ impl Dialect for DuckDbDialect {
7171
fn supports_load_extension(&self) -> bool {
7272
true
7373
}
74+
75+
/// See DuckDB <https://duckdb.org/docs/sql/data_types/struct.html#retrieving-from-structs>
76+
fn support_period_map_access_key(&self) -> bool {
77+
true
78+
}
7479
}

src/dialect/generic.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,8 @@ impl Dialect for GenericDialect {
119119
fn supports_load_extension(&self) -> bool {
120120
true
121121
}
122+
123+
fn support_period_map_access_key(&self) -> bool {
124+
true
125+
}
122126
}

src/dialect/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,15 @@ pub trait Dialect: Debug + Any {
657657
fn supports_create_table_select(&self) -> bool {
658658
false
659659
}
660+
661+
/// Return true if the dialect supports the period map access key
662+
///
663+
/// Access on BigQuery nested and repeated expressions can
664+
/// mix notations in the same expression.
665+
/// https://cloud.google.com/bigquery/docs/nested-repeated#query_nested_and_repeated_columns
666+
fn support_period_map_access_key(&self) -> bool {
667+
false
668+
}
660669
}
661670

662671
/// This represents the operators for which precedence must be defined

0 commit comments

Comments
 (0)