Skip to content

Commit 562fa56

Browse files
pr comments
1 parent f8bbdee commit 562fa56

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

packages/bigframes/bigframes/session/bq_caching_executor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __init__(
8181
enable_polars_execution: bool = False,
8282
publisher: bigframes.core.events.Publisher,
8383
labels: tuple[tuple[str, str], ...] = (),
84-
compiler_name: Literal["ibis", "sqlglot"] = "ibis",
84+
compiler_name: Literal["ibis", "sqlglot"] = "sqlglot",
8585
cache: Optional[execution_cache.ExecutionCache] = None,
8686
):
8787
self.bqclient = bqclient
@@ -376,8 +376,9 @@ def _run_execute_query(
376376
bigframes.options.compute.maximum_bytes_billed
377377
)
378378

379-
if self._labels or extra_labels:
379+
if self._labels:
380380
job_config.labels.update(self._labels)
381+
if extra_labels:
381382
job_config.labels.update(extra_labels)
382383

383384
try:

packages/bigframes/bigframes/session/proxy_executor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ def to_sql(
9191
"""
9292
Convert an ArrayValue to a sql query that will yield its value.
9393
"""
94+
compiler_option = bigframes.options.experiments.sql_compiler
95+
# Use ibis unless sqlglot explicitly selected, since we can't handle errors resulting
96+
# from use of the sql produced by this method.
97+
if compiler_option == "experimental":
98+
return self._sqlglot_executor.to_sql(
99+
array_value,
100+
offset_column=offset_column,
101+
ordered=ordered,
102+
enable_cache=enable_cache,
103+
)
104+
# stable or legacy use ibis
94105
return self._ibis_executor.to_sql(
95106
array_value,
96107
offset_column=offset_column,

0 commit comments

Comments
 (0)