Skip to content

Commit c49f26a

Browse files
committed
switch golden tests to ibis compiler
1 parent 7e03252 commit c49f26a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bigframes/testing/compiler_session.py

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

1818
import bigframes.core
19-
import bigframes.core.compile.sqlglot as sqlglot
19+
from bigframes.core.compile import configs
20+
import bigframes.core.compile.compiler as compiler
2021
import bigframes.session.executor
2122

2223

2324
@dataclasses.dataclass
2425
class SQLCompilerExecutor(bigframes.session.executor.Executor):
2526
"""Executor for SQL compilation using sqlglot."""
2627

27-
compiler = sqlglot
28-
2928
def to_sql(
3029
self,
3130
array_value: bigframes.core.ArrayValue,
@@ -38,6 +37,6 @@ def to_sql(
3837

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

0 commit comments

Comments
 (0)