diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-19 11:01:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-19 11:01:36 +0000 |
commit | 948a422be120c069e48c63a8770fec7204307897 (patch) | |
tree | 80bc02d5e6cd3527409386aa1d706272bea54e6c /sqlglot/dialects/bigquery.py | |
parent | Adding upstream version 20.1.0. (diff) | |
download | sqlglot-948a422be120c069e48c63a8770fec7204307897.tar.xz sqlglot-948a422be120c069e48c63a8770fec7204307897.zip |
Adding upstream version 20.3.0.upstream/20.3.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 | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sqlglot/dialects/bigquery.py b/sqlglot/dialects/bigquery.py index 2a9dde9..1b06cbf 100644 --- a/sqlglot/dialects/bigquery.py +++ b/sqlglot/dialects/bigquery.py @@ -215,6 +215,7 @@ def _unix_to_time_sql(self: BigQuery.Generator, expression: exp.UnixToTime) -> s class BigQuery(Dialect): + WEEK_OFFSET = -1 UNNEST_COLUMN_ONLY = True SUPPORTS_USER_DEFINED_TYPES = False SUPPORTS_SEMI_ANTI_JOIN = False @@ -437,11 +438,7 @@ class BigQuery(Dialect): elif isinstance(this, exp.Literal): table_name = this.name - if ( - self._curr - and self._prev.end == self._curr.start - 1 - and self._parse_var(any_token=True) - ): + if self._is_connected() and self._parse_var(any_token=True): table_name += self._prev.text this = exp.Identifier(this=table_name, quoted=True) |