diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-20 08:50:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-20 08:50:30 +0000 |
commit | cc4c7716b8fe6b13bf735ab1ccbc1a92ded4d6d5 (patch) | |
tree | 3723d527945944e4fed74f7fe9da43407349351a /sqlglot/dialects/bigquery.py | |
parent | Adding upstream version 11.1.3. (diff) | |
download | sqlglot-cc4c7716b8fe6b13bf735ab1ccbc1a92ded4d6d5.tar.xz sqlglot-cc4c7716b8fe6b13bf735ab1ccbc1a92ded4d6d5.zip |
Adding upstream version 11.2.0.upstream/11.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/dialects/bigquery.py')
-rw-r--r-- | sqlglot/dialects/bigquery.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py index 7fd9e35..a75e802 100644 --- a/sqlglot/dialects/bigquery.py +++ b/sqlglot/dialects/bigquery.py @@ -13,6 +13,7 @@ from sqlglot.dialects.dialect import ( no_ilike_sql, rename_func, timestrtotime_sql, + ts_or_ds_to_date_sql, ) from sqlglot.helper import seq_get from sqlglot.tokens import TokenType @@ -233,6 +234,7 @@ class BigQuery(Dialect): exp.TimestampAdd: _date_add_sql("TIMESTAMP", "ADD"), exp.TimestampSub: _date_add_sql("TIMESTAMP", "SUB"), exp.TimeStrToTime: timestrtotime_sql, + exp.TsOrDsToDate: ts_or_ds_to_date_sql("bigquery"), exp.PartitionedByProperty: lambda self, e: f"PARTITION BY {self.sql(e, 'this')}", exp.VariancePop: rename_func("VAR_POP"), exp.Values: _derived_table_values_to_unnest, |