Skip to content

Commit e7209d2

Browse files
committed
switch golden tests to ibis compiler
1 parent 3a4be75 commit e7209d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bigframes/testing/compiler_session.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
import typing
1717

1818
import bigframes.core
19-
import bigframes.core.compile.sqlglot as sqlglot
19+
from bigframes.core.compile import configs
20+
from bigframes.core.compile.ibis_compiler import ibis_compiler
21+
2022
import bigframes.session.executor
2123

2224

2325
@dataclasses.dataclass
2426
class SQLCompilerExecutor(bigframes.session.executor.Executor):
2527
"""Executor for SQL compilation using sqlglot."""
2628

27-
compiler = sqlglot
28-
2929
def to_sql(
3030
self,
3131
array_value: bigframes.core.ArrayValue,
@@ -38,6 +38,6 @@ def to_sql(
3838

3939
# Compared with BigQueryCachingExecutor, SQLCompilerExecutor skips
4040
# caching the subtree.
41-
return self.compiler.SQLGlotCompiler().compile(
42-
array_value.node, ordered=ordered
43-
)
41+
request = configs.CompileRequest(array_value.node, sort_rows=ordered)
42+
compiled = ibis_compiler.compile_sql(request)
43+
return compiled.sql

0 commit comments

Comments
 (0)