Skip to content

Commit 0a88b10

Browse files
committed
Merge branch 'main' into shuowei-anywidget-nested-strcut-array
2 parents 60785f3 + 81e27b3 commit 0a88b10

File tree

12 files changed

+74
-20
lines changed

12 files changed

+74
-20
lines changed

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620
22
libraries:
33
- id: bigframes
4-
version: 2.31.0
4+
version: 2.32.0
55
last_generated_commit: ""
66
apis: []
77
source_roots:

CHANGELOG.md

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

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

7+
## [2.32.0](https://github.com/googleapis/google-cloud-python/compare/bigframes-v2.31.0...bigframes-v2.32.0) (2026-01-05)
8+
9+
10+
### Documentation
11+
12+
* generate sitemap.xml for better search indexing (#2351) ([7d2990f1c48c6d74e2af6bee3af87f90189a3d9b](https://github.com/googleapis/google-cloud-python/commit/7d2990f1c48c6d74e2af6bee3af87f90189a3d9b))
13+
* update supported pandas APIs documentation links (#2330) ([ea71936ce240b2becf21b552d4e41e8ef4418e2d](https://github.com/googleapis/google-cloud-python/commit/ea71936ce240b2becf21b552d4e41e8ef4418e2d))
14+
* Add time series analysis notebook (#2328) ([369f1c0aff29d197b577ec79e401b107985fe969](https://github.com/googleapis/google-cloud-python/commit/369f1c0aff29d197b577ec79e401b107985fe969))
15+
16+
17+
### Features
18+
19+
* Enable multi-column sorting in anywidget mode (#2360) ([1feb956e4762e30276e5b380c0633e6ed7881357](https://github.com/googleapis/google-cloud-python/commit/1feb956e4762e30276e5b380c0633e6ed7881357))
20+
* display series in anywidget mode (#2346) ([7395d418550058c516ad878e13567256f4300a37](https://github.com/googleapis/google-cloud-python/commit/7395d418550058c516ad878e13567256f4300a37))
21+
* Refactor TableWidget and to_pandas_batches (#2250) ([b8f09015a7c8e6987dc124e6df925d4f6951b1da](https://github.com/googleapis/google-cloud-python/commit/b8f09015a7c8e6987dc124e6df925d4f6951b1da))
22+
* Auto-plan complex reduction expressions (#2298) ([4d5de14ccdd05b1ac8f50c3fe71c35ab9e5150c1](https://github.com/googleapis/google-cloud-python/commit/4d5de14ccdd05b1ac8f50c3fe71c35ab9e5150c1))
23+
* Display custom single index column in anywidget mode (#2311) ([f27196260743883ed8131d5fd33a335e311177e4](https://github.com/googleapis/google-cloud-python/commit/f27196260743883ed8131d5fd33a335e311177e4))
24+
* add fit_predict method to ml unsupervised models (#2320) ([59df7f70a12ef702224ad61e597bd775208dac45](https://github.com/googleapis/google-cloud-python/commit/59df7f70a12ef702224ad61e597bd775208dac45))
25+
26+
27+
### Bug Fixes
28+
29+
* vendor sqlglot bigquery dialect and remove package dependency (#2354) ([b321d72d5eb005b6e9295541a002540f05f72209](https://github.com/googleapis/google-cloud-python/commit/b321d72d5eb005b6e9295541a002540f05f72209))
30+
* bigframes.ml fit with eval data in partial mode avoids join on null index (#2355) ([7171d21b8c8d5a2d61081f41fa1109b5c9c4bc5f](https://github.com/googleapis/google-cloud-python/commit/7171d21b8c8d5a2d61081f41fa1109b5c9c4bc5f))
31+
* Improve strictness of nan vs None usage (#2326) ([481d938fb0b840e17047bc4b57e61af15b976e54](https://github.com/googleapis/google-cloud-python/commit/481d938fb0b840e17047bc4b57e61af15b976e54))
32+
* Correct DataFrame widget rendering in Colab (#2319) ([7f1d3df3839ec58f52e48df088057fc0df967da9](https://github.com/googleapis/google-cloud-python/commit/7f1d3df3839ec58f52e48df088057fc0df967da9))
33+
* Fix pd.timedelta handling in polars comipler with polars 1.36 (#2325) ([252644826289d9db7a8548884de880b3a4fccafd](https://github.com/googleapis/google-cloud-python/commit/252644826289d9db7a8548884de880b3a4fccafd))
34+
735
## [2.31.0](https://github.com/googleapis/google-cloud-python/compare/bigframes-v2.30.0...bigframes-v2.31.0) (2025-12-10)
836

937

bigframes/core/compile/sqlglot/aggregations/windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _compile_group_by_key(key: ex.Expression) -> sge.Expression:
174174
if key.dtype == dtypes.FLOAT_DTYPE:
175175
expr = sge.Cast(this=expr, to="STRING")
176176
elif key.dtype == dtypes.GEO_DTYPE:
177-
expr = sge.Cast(this=expr, to="BYTES")
177+
expr = sge.func("ST_ASBINARY", expr)
178178
elif key.dtype == dtypes.JSON_DTYPE:
179179
expr = sge.func("TO_JSON_STRING", expr)
180180
return expr

bigframes/core/compile/sqlglot/expressions/blob_ops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def _(expr: TypedExpr) -> sge.Expression:
2929
return sge.func("OBJ.FETCH_METADATA", expr.expr)
3030

3131

32-
@register_unary_op(ops.ObjGetAccessUrl)
33-
def _(expr: TypedExpr) -> sge.Expression:
34-
return sge.func("OBJ.GET_ACCESS_URL", expr.expr)
32+
@register_unary_op(ops.ObjGetAccessUrl, pass_op=True)
33+
def _(expr: TypedExpr, op: ops.ObjGetAccessUrl) -> sge.Expression:
34+
return sge.func("OBJ.GET_ACCESS_URL", expr.expr, sge.convert(op.mode))
3535

3636

3737
@register_binary_op(ops.obj_make_ref_op)

bigframes/core/compile/sqlglot/expressions/string_ops.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@ def _(expr: TypedExpr, op: ops.StrExtractOp) -> sge.Expression:
4848
# Cannot use BigQuery's REGEXP_EXTRACT function, which only allows one
4949
# capturing group.
5050
pat_expr = sge.convert(op.pat)
51-
if op.n != 0:
52-
pat_expr = sge.func("CONCAT", sge.convert(".*?"), pat_expr, sge.convert(".*"))
53-
else:
51+
if op.n == 0:
5452
pat_expr = sge.func("CONCAT", sge.convert(".*?("), pat_expr, sge.convert(").*"))
53+
n = 1
54+
else:
55+
pat_expr = sge.func("CONCAT", sge.convert(".*?"), pat_expr, sge.convert(".*"))
56+
n = op.n
5557

56-
rex_replace = sge.func("REGEXP_REPLACE", expr.expr, pat_expr, sge.convert(r"\1"))
58+
rex_replace = sge.func("REGEXP_REPLACE", expr.expr, pat_expr, sge.convert(f"\\{n}"))
5759
rex_contains = sge.func("REGEXP_CONTAINS", expr.expr, sge.convert(op.pat))
5860
return sge.If(this=rex_contains, true=rex_replace, false=sge.null())
5961

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.31.0"
15+
__version__ = "2.32.0"
1616

1717
# {x-release-please-start-date}
18-
__release_date__ = "2025-12-10"
18+
__release_date__ = "2026-01-05"
1919
# {x-release-please-end}

biome.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"formatter": {
3+
"indentStyle": "space",
4+
"indentWidth": 2
5+
},
6+
"javascript": {
7+
"formatter": {
8+
"quoteStyle": "single"
9+
}
10+
},
11+
"css": {
12+
"formatter": {
13+
"quoteStyle": "single"
14+
}
15+
}
16+
}

tests/unit/core/compile/sqlglot/aggregations/test_windows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_apply_window_if_present_grouping_no_ordering(self):
114114
)
115115
self.assertEqual(
116116
result.sql(dialect="bigquery"),
117-
"value OVER (PARTITION BY `col1`, CAST(`col2` AS STRING), TO_JSON_STRING(`col3`), CAST(`col4` AS BYTES))",
117+
"value OVER (PARTITION BY `col1`, CAST(`col2` AS STRING), TO_JSON_STRING(`col3`), ST_ASBINARY(`col4`))",
118118
)
119119

120120
def test_apply_window_if_present_range_bounded(self):

tests/unit/core/compile/sqlglot/expressions/snapshots/test_blob_ops/test_obj_get_access_url/out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ WITH `bfcte_0` AS (
1111
), `bfcte_2` AS (
1212
SELECT
1313
*,
14-
OBJ.GET_ACCESS_URL(`bfcol_4`) AS `bfcol_7`
14+
OBJ.GET_ACCESS_URL(`bfcol_4`, 'R') AS `bfcol_7`
1515
FROM `bfcte_1`
1616
), `bfcte_3` AS (
1717
SELECT

tests/unit/core/compile/sqlglot/expressions/snapshots/test_string_ops/test_str_extract/out.sql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8+
IF(
9+
REGEXP_CONTAINS(`string_col`, '([a-z]*)'),
10+
REGEXP_REPLACE(`string_col`, CONCAT('.*?(', '([a-z]*)', ').*'), '\\1'),
11+
NULL
12+
) AS `bfcol_1`,
813
IF(
914
REGEXP_CONTAINS(`string_col`, '([a-z]*)'),
1015
REGEXP_REPLACE(`string_col`, CONCAT('.*?', '([a-z]*)', '.*'), '\\1'),
1116
NULL
12-
) AS `bfcol_1`
17+
) AS `bfcol_2`
1318
FROM `bfcte_0`
1419
)
1520
SELECT
16-
`bfcol_1` AS `string_col`
21+
`bfcol_1` AS `zero`,
22+
`bfcol_2` AS `one`
1723
FROM `bfcte_1`

0 commit comments

Comments
 (0)