1414
1515from __future__ import annotations
1616
17+ from typing import Mapping , Optional
1718import typing
1819import uuid
1920import warnings
2021
21- import bigframes_vendored .ibis .expr .types as ibis_types
2222import google .cloud .exceptions
2323
2424import bigframes .core
@@ -89,7 +89,7 @@ def to_sql(
8989 """
9090 Convert an ArrayValue to a sql query that will yield its value.
9191 """
92- return self ._main .to_sql (
92+ return self ._ibis_executor .to_sql (
9393 array_value ,
9494 offset_column = offset_column ,
9595 ordered = ordered ,
@@ -106,15 +106,15 @@ def execute(
106106 return self ._ibis_executor .execute (array_value , execution_spec )
107107 elif compiler_option == "experimental" :
108108 return self ._sqlglot_executor .execute (
109- array_value , execution_spec .add_labels (( _COMPILER_LABEL_KEY , "sqlglot" ) )
109+ array_value , execution_spec .add_labels ({ _COMPILER_LABEL_KEY : "sqlglot" } )
110110 )
111111 else : # stable
112112 correlation_id = f"{ uuid .uuid1 ().hex [:12 ]} "
113113 try :
114114 return self ._sqlglot_executor .execute (
115115 array_value ,
116116 execution_spec .add_labels (
117- ( _COMPILER_LABEL_KEY , f"sqlglot-{ correlation_id } " )
117+ { _COMPILER_LABEL_KEY : f"sqlglot-{ correlation_id } " }
118118 ),
119119 )
120120 except google .cloud .exceptions .BadRequest as e :
@@ -126,7 +126,7 @@ def execute(
126126 return self ._ibis_executor .execute (
127127 array_value ,
128128 execution_spec .add_labels (
129- ( _COMPILER_LABEL_KEY , f"ibis-{ correlation_id } " )
129+ { _COMPILER_LABEL_KEY : f"ibis-{ correlation_id } " }
130130 ),
131131 )
132132
@@ -144,7 +144,7 @@ def cached(
144144 self ,
145145 array_value : bigframes .core .ArrayValue ,
146146 * ,
147- config : CacheConfig ,
147+ config : executor . CacheConfig ,
148148 ) -> None :
149149 compiler_option = bigframes .options .experiments .sql_compiler
150150 if compiler_option == "legacy" :
0 commit comments