This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
bigframes/core/compile/ibis_compiler Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -221,15 +221,18 @@ def _table_to_ibis(
221221 physical_schema = ibis_bigquery .BigQuerySchema .to_ibis (
222222 list (source .table .physical_schema )
223223 )
224- import bigframes .session ._io .bigquery
225-
226- sql = bigframes .session ._io .bigquery .to_query (
227- full_table_name ,
228- columns = scan_cols ,
229- sql_predicate = source .sql_predicate ,
230- time_travel_timestamp = source .at_time ,
231- )
232- return ibis_bigquery .Backend ().sql (schema = physical_schema , query = sql )
224+ if source .at_time is not None or source .sql_predicate is not None :
225+ import bigframes .session ._io .bigquery
226+
227+ sql = bigframes .session ._io .bigquery .to_query (
228+ full_table_name ,
229+ columns = scan_cols ,
230+ sql_predicate = source .sql_predicate ,
231+ time_travel_timestamp = source .at_time ,
232+ )
233+ return ibis_bigquery .Backend ().sql (schema = physical_schema , query = sql )
234+ else :
235+ return ibis_api .table (physical_schema , full_table_name ).select (scan_cols )
233236
234237
235238@_compile_node .register
Original file line number Diff line number Diff line change @@ -562,6 +562,9 @@ def test_pyformat_with_bigframes_dataframe_biglake_table(session):
562562 # For BigLake, we now expect a SUBQUERY, not a view reference.
563563 # The subquery should have correctly quoted 4-part ID.
564564 assert "SELECT" in got_sql
565- assert "FROM `my-project`.`my-catalog`.`my-namespace`.`my-table`" in got_sql
565+ assert project_id in got_sql
566+ assert catalog_id in got_sql
567+ assert namespace_id in got_sql
568+ assert table_id in got_sql
566569 assert got_sql .startswith ("SELECT * FROM (SELECT" )
567570 assert got_sql .endswith (")" )
You can’t perform that action at this time.
0 commit comments