diff options
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) |