Skip to content

Commit 2348e7a

Browse files
committed
Merge remote-tracking branch 'origin/main' into b409104302-callback
2 parents bc8b4ae + 200458d commit 2348e7a

File tree

9 files changed

+89
-48
lines changed

9 files changed

+89
-48
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@
44

55
[1]: https://pypi.org/project/bigframes/#history
66

7+
## [2.18.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v2.17.0...v2.18.0) (2025-09-03)
8+
9+
10+
### ⚠ BREAKING CHANGES
11+
12+
* add `allow_large_results` option to `read_gbq_query`, aligning with `bpd.options.compute.allow_large_results` option ([#1935](https://github.com/googleapis/python-bigquery-dataframes/issues/1935))
13+
14+
### Features
15+
16+
* Add `allow_large_results` option to `read_gbq_query`, aligning with `bpd.options.compute.allow_large_results` option ([#1935](https://github.com/googleapis/python-bigquery-dataframes/issues/1935)) ([a7963fe](https://github.com/googleapis/python-bigquery-dataframes/commit/a7963fe57a0e141debf726f0bc7b0e953ebe9634))
17+
* Add parameter shuffle for ml.model_selection.train_test_split ([#2030](https://github.com/googleapis/python-bigquery-dataframes/issues/2030)) ([2c72c56](https://github.com/googleapis/python-bigquery-dataframes/commit/2c72c56fb5893eb01d5aec6273d11945c9c532c5))
18+
* Can pivot unordered, unindexed dataframe ([#2040](https://github.com/googleapis/python-bigquery-dataframes/issues/2040)) ([1a0f710](https://github.com/googleapis/python-bigquery-dataframes/commit/1a0f710ac11418fd71ab3373f3f6002fa581b180))
19+
* Local date accessor execution support ([#2034](https://github.com/googleapis/python-bigquery-dataframes/issues/2034)) ([7ac6fe1](https://github.com/googleapis/python-bigquery-dataframes/commit/7ac6fe16f7f2c09d2efac6ab813ec841c21baef8))
20+
* Support args in dataframe apply method ([#2026](https://github.com/googleapis/python-bigquery-dataframes/issues/2026)) ([164c481](https://github.com/googleapis/python-bigquery-dataframes/commit/164c4818bc4ff2990dca16b9f22a798f47e0a60b))
21+
* Support args in series apply method ([#2013](https://github.com/googleapis/python-bigquery-dataframes/issues/2013)) ([d9d725c](https://github.com/googleapis/python-bigquery-dataframes/commit/d9d725cfbc3dca9e66b460cae4084e25162f2acf))
22+
* Support callable for dataframe mask method ([#2020](https://github.com/googleapis/python-bigquery-dataframes/issues/2020)) ([9d4504b](https://github.com/googleapis/python-bigquery-dataframes/commit/9d4504be310d38b63515d67c0f60d2e48e68c7b5))
23+
* Support multi-column assignment for DataFrame ([#2028](https://github.com/googleapis/python-bigquery-dataframes/issues/2028)) ([ba0d23b](https://github.com/googleapis/python-bigquery-dataframes/commit/ba0d23b59c44ba5a46ace8182ad0e0cfc703b3ab))
24+
* Support string matching in local executor ([#2032](https://github.com/googleapis/python-bigquery-dataframes/issues/2032)) ([c0b54f0](https://github.com/googleapis/python-bigquery-dataframes/commit/c0b54f03849ee3115413670e690e68f3ef10f2ec))
25+
26+
27+
### Bug Fixes
28+
29+
* Fix scalar op lowering tree walk ([#2029](https://github.com/googleapis/python-bigquery-dataframes/issues/2029)) ([935af10](https://github.com/googleapis/python-bigquery-dataframes/commit/935af107ef98837fb2b81d72185d0b6a9e09fbcf))
30+
* Read_csv fails when check file size for wildcard gcs files ([#2019](https://github.com/googleapis/python-bigquery-dataframes/issues/2019)) ([b0d620b](https://github.com/googleapis/python-bigquery-dataframes/commit/b0d620bbe8227189bbdc2ba5a913b03c70575296))
31+
* Resolve the validation issue for other arg in dataframe where method ([#2042](https://github.com/googleapis/python-bigquery-dataframes/issues/2042)) ([8689199](https://github.com/googleapis/python-bigquery-dataframes/commit/8689199aa82212ed300fff592097093812e0290e))
32+
33+
34+
### Performance Improvements
35+
36+
* Improve axis=1 aggregation performance ([#2036](https://github.com/googleapis/python-bigquery-dataframes/issues/2036)) ([fbb2094](https://github.com/googleapis/python-bigquery-dataframes/commit/fbb209468297a8057d9d49c40e425c3bfdeb92bd))
37+
* Improve iter_nodes_topo performance using Kahn's algorithm ([#2038](https://github.com/googleapis/python-bigquery-dataframes/issues/2038)) ([3961637](https://github.com/googleapis/python-bigquery-dataframes/commit/39616374bba424996ebeb9a12096bfaf22660b44))
38+
739
## [2.17.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v2.16.0...v2.17.0) (2025-08-22)
840

941

bigframes/bigquery/__init__.py

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
such as array functions:
1717
https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions. """
1818

19+
import sys
20+
1921
from bigframes.bigquery._operations.approx_agg import approx_top_count
2022
from bigframes.bigquery._operations.array import (
2123
array_agg,
@@ -52,43 +54,51 @@
5254
from bigframes.bigquery._operations.search import create_vector_index, vector_search
5355
from bigframes.bigquery._operations.sql import sql_scalar
5456
from bigframes.bigquery._operations.struct import struct
57+
from bigframes.core import log_adapter
5558

56-
__all__ = [
59+
_functions = [
5760
# approximate aggregate ops
58-
"approx_top_count",
61+
approx_top_count,
5962
# array ops
60-
"array_agg",
61-
"array_length",
62-
"array_to_string",
63+
array_agg,
64+
array_length,
65+
array_to_string,
6366
# datetime ops
64-
"unix_micros",
65-
"unix_millis",
66-
"unix_seconds",
67+
unix_micros,
68+
unix_millis,
69+
unix_seconds,
6770
# geo ops
68-
"st_area",
69-
"st_buffer",
70-
"st_centroid",
71-
"st_convexhull",
72-
"st_difference",
73-
"st_distance",
74-
"st_intersection",
75-
"st_isclosed",
76-
"st_length",
71+
st_area,
72+
st_buffer,
73+
st_centroid,
74+
st_convexhull,
75+
st_difference,
76+
st_distance,
77+
st_intersection,
78+
st_isclosed,
79+
st_length,
7780
# json ops
78-
"json_extract",
79-
"json_extract_array",
80-
"json_extract_string_array",
81-
"json_query",
82-
"json_query_array",
83-
"json_set",
84-
"json_value",
85-
"json_value_array",
86-
"parse_json",
81+
json_extract,
82+
json_extract_array,
83+
json_extract_string_array,
84+
json_query,
85+
json_query_array,
86+
json_set,
87+
json_value,
88+
json_value_array,
89+
parse_json,
8790
# search ops
88-
"create_vector_index",
89-
"vector_search",
91+
create_vector_index,
92+
vector_search,
9093
# sql ops
91-
"sql_scalar",
94+
sql_scalar,
9295
# struct ops
93-
"struct",
96+
struct,
9497
]
98+
99+
__all__ = [f.__name__ for f in _functions]
100+
101+
_module = sys.modules[__name__]
102+
for f in _functions:
103+
_decorated_object = log_adapter.method_logger(f, custom_base_name="bigquery")
104+
setattr(_module, f.__name__, _decorated_object)

bigframes/bigquery/_operations/search.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import google.cloud.bigquery as bigquery
2222

23-
import bigframes.core.sql
2423
import bigframes.ml.utils as utils
2524

2625
if typing.TYPE_CHECKING:

bigframes/bigquery/_operations/sql.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import google.cloud.bigquery
2222

2323
import bigframes.core.compile.sqlglot.sqlglot_ir as sqlglot_ir
24-
import bigframes.core.sql
25-
import bigframes.dataframe
2624
import bigframes.dtypes
2725
import bigframes.operations
2826
import bigframes.series

bigframes/session/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,6 @@ def bytes_processed_sum(self):
345345
@property
346346
def slot_millis_sum(self):
347347
"""The sum of all slot time used by bigquery jobs in this session."""
348-
if not bigframes.options._allow_large_results:
349-
msg = bfe.format_message(
350-
"Queries executed with `allow_large_results=False` within the session will not "
351-
"have their slot milliseconds counted in this sum. If you need precise slot "
352-
"milliseconds information, query the `INFORMATION_SCHEMA` tables "
353-
"to get relevant metrics.",
354-
)
355-
warnings.warn(msg, UserWarning)
356-
357348
return self._metrics.slot_millis
358349

359350
@property

bigframes/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "2.17.0"
15+
__version__ = "2.18.0"
1616

1717
# {x-release-please-start-date}
18-
__release_date__ = "2025-08-22"
18+
__release_date__ = "2025-09-03"
1919
# {x-release-please-end}

samples/snippets/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ def gcs_bucket(storage_client: storage.Client) -> Generator[str, None, None]:
6363
blob.delete()
6464

6565

66+
@pytest.fixture(scope="session")
67+
def gcs_bucket_snippets(storage_client: storage.Client) -> Generator[str, None, None]:
68+
bucket_name = "bigframes_blob_test_snippet_with_data_wipeout"
69+
70+
yield bucket_name
71+
72+
bucket = storage_client.get_bucket(bucket_name)
73+
for blob in bucket.list_blobs():
74+
blob.delete()
75+
76+
6677
@pytest.fixture(autouse=True)
6778
def reset_session() -> None:
6879
"""An autouse fixture ensuring each sample runs in a fresh session.

samples/snippets/multimodal_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
# limitations under the License.
1414

1515

16-
def test_multimodal_dataframe(gcs_bucket: str) -> None:
16+
def test_multimodal_dataframe(gcs_bucket_snippets: str) -> None:
1717
# destination folder must be in a GCS bucket that the BQ connection service account (default or user provided) has write access to.
18-
dst_bucket = f"gs://{gcs_bucket}"
18+
dst_bucket = f"gs://{gcs_bucket_snippets}"
1919
# [START bigquery_dataframes_multimodal_dataframe_create]
2020
import bigframes
2121

third_party/bigframes_vendored/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "2.17.0"
15+
__version__ = "2.18.0"
1616

1717
# {x-release-please-start-date}
18-
__release_date__ = "2025-08-22"
18+
__release_date__ = "2025-09-03"
1919
# {x-release-please-end}

0 commit comments

Comments
 (0)