2525 import bigframes .core .ordering
2626 import bigframes .core .schema
2727
28- _STRICT_COMPILER = compiler .Compiler (strict = True )
29-
3028
3129class SQLCompiler :
32- def __init__ (self , strict : bool = True ):
33- self ._compiler = compiler .Compiler (strict = strict )
34-
3530 def compile (
3631 self ,
3732 node : bigframes .core .nodes .BigFrameNode ,
@@ -41,7 +36,7 @@ def compile(
4136 ) -> str :
4237 """Compile node into sql where rows are sorted with ORDER BY."""
4338 # If we are ordering the query anyways, compiling the slice as a limit is probably a good idea.
44- return self . _compiler .compile_sql (node , ordered = ordered , limit = limit )
39+ return compiler .compile_sql (node , ordered = ordered , limit = limit )
4540
4641 def compile_raw (
4742 self ,
@@ -50,16 +45,16 @@ def compile_raw(
5045 str , Sequence [bigquery .SchemaField ], bigframes .core .ordering .RowOrdering
5146 ]:
5247 """Compile node into sql that exposes all columns, including hidden ordering-only columns."""
53- return self . _compiler .compile_raw (node )
48+ return compiler .compile_raw (node )
5449
5550
5651def test_only_ibis_inferred_schema (node : bigframes .core .nodes .BigFrameNode ):
5752 """Use only for testing paths to ensure ibis inferred schema does not diverge from bigframes inferred schema."""
5853 import bigframes .core .schema
5954
60- node = _STRICT_COMPILER ._replace_unsupported_ops (node )
55+ node = compiler ._replace_unsupported_ops (node )
6156 node , _ = rewrite .pull_up_order (node , order_root = False )
62- ir = _STRICT_COMPILER .compile_node (node )
57+ ir = compiler .compile_node (node )
6358 items = tuple (
6459 bigframes .core .schema .SchemaItem (name , ir .get_column_type (ibis_id ))
6560 for name , ibis_id in zip (node .schema .names , ir .column_ids )
0 commit comments