Skip to content

Commit ac2a055

Browse files
committed
chore: bigquery remove page_size parameter from raw_sql
1 parent be4b665 commit ac2a055

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

ibis/backends/bigquery/__init__.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import pandas as pd
4444
import polars as pl
4545
import pyarrow as pa
46+
from google.cloud.bigquery.table import RowIterator
4647

4748

4849
SCOPES = ["https://www.googleapis.com/auth/bigquery"]
@@ -666,7 +667,7 @@ def _get_schema_using_query(self, query: str) -> sch.Schema:
666667
)
667668
return BigQuerySchema.to_ibis(job.schema)
668669

669-
def raw_sql(self, query: str, params=None, page_size: int | None = None):
670+
def raw_sql(self, query: str, params=None) -> RowIterator:
670671
query_parameters = [
671672
bigquery_param(param.type(), value, param.get_name())
672673
for param, value in (params or {}).items()
@@ -676,10 +677,7 @@ def raw_sql(self, query: str, params=None, page_size: int | None = None):
676677

677678
job_config = bq.job.QueryJobConfig(query_parameters=query_parameters or [])
678679
return self.client.query_and_wait(
679-
query,
680-
job_config=job_config,
681-
project=self.billing_project,
682-
page_size=page_size,
680+
query, job_config=job_config, project=self.billing_project
683681
)
684682

685683
@property
@@ -770,14 +768,13 @@ def _to_query(
770768
*,
771769
params: Mapping[ir.Scalar, Any] | None = None,
772770
limit: int | str | None = None,
773-
page_size: int | None = None,
774771
**kwargs: Any,
775-
):
772+
) -> RowIterator:
776773
self._run_pre_execute_hooks(table_expr)
777774
sql = self.compile(table_expr, limit=limit, params=params, **kwargs)
778775
self._log(sql)
779776

780-
return self.raw_sql(sql, params=params, page_size=page_size)
777+
return self.raw_sql(sql, params=params)
781778

782779
def to_pyarrow(
783780
self,
@@ -816,9 +813,7 @@ def to_pyarrow_batches(
816813
schema = table_expr.schema() - ibis.schema({"_TABLE_SUFFIX": "string"})
817814
colnames = list(schema.names)
818815

819-
query = self._to_query(
820-
table_expr, params=params, limit=limit, page_size=chunk_size, **kwargs
821-
)
816+
query = self._to_query(table_expr, params=params, limit=limit, **kwargs)
822817
batch_iter = query.to_arrow_iterable(bqstorage_client=self.storage_client)
823818
return pa.ipc.RecordBatchReader.from_batches(
824819
schema.to_pyarrow(),

0 commit comments

Comments
 (0)