1919from google .cloud import bigquery
2020
2121import bigframes
22+ import google .cloud .bigquery_storage_v1
2223from bigframes .core import ArrayValue , events , local_data
2324from bigframes .session import (
2425 direct_gbq_execution ,
@@ -45,19 +46,28 @@ def fake_session() -> Generator[bigframes.Session, None, None]:
4546
4647
4748@pytest .fixture (scope = "session" , params = ["pyarrow" , "polars" , "bq" , "bq-sqlglot" ])
48- def engine (request , bigquery_client : bigquery .Client ) -> semi_executor .SemiExecutor :
49+ def engine (
50+ request ,
51+ bigquery_client : bigquery .Client ,
52+ bigquery_storage_read_client : google .cloud .bigquery_storage_v1 .BigQueryReadClient ,
53+ ) -> semi_executor .SemiExecutor :
4954 if request .param == "pyarrow" :
5055 return local_scan_executor .LocalScanExecutor ()
5156 if request .param == "polars" :
5257 return polars_executor .PolarsExecutor ()
5358 publisher = events .Publisher ()
5459 if request .param == "bq" :
5560 return direct_gbq_execution .DirectGbqExecutor (
56- bigquery_client , publisher = publisher
61+ bigquery_client ,
62+ bqstoragereadclient = bigquery_storage_read_client ,
63+ publisher = publisher ,
5764 )
5865 if request .param == "bq-sqlglot" :
5966 return direct_gbq_execution .DirectGbqExecutor (
60- bigquery_client , compiler = "sqlglot" , publisher = publisher
67+ bigquery_client ,
68+ bqstoragereadclient = bigquery_storage_read_client ,
69+ compiler = "sqlglot" ,
70+ publisher = publisher ,
6171 )
6272 raise ValueError (f"Unrecognized param: { request .param } " )
6373
0 commit comments