Skip to content

Commit b70268d

Browse files
committed
Merge branch 'main' into librarian-20260612T171649Z
2 parents 874b5ba + af19393 commit b70268d

52 files changed

Lines changed: 1638 additions & 405 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.librarian/config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ libraries:
3838
# TODO(https://github.com/googleapis/google-cloud-python/issues/17327)
3939
- id: "google-cloud-bigtable"
4040
release_blocked: true
41-
42-

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:234b9d1f2ddb057ed7ac6a38db0bf8163d839c65c6cf88ade52530cddebce59e
1515
libraries:
1616
- id: bigframes
17-
version: 2.42.0
17+
version: 2.43.0
1818
last_generated_commit: ""
1919
apis: []
2020
source_roots:

librarian.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ default:
5858
library_type: GAPIC_AUTO
5959
libraries:
6060
- name: bigframes
61-
version: 2.42.0
61+
version: 2.43.0
6262
skip_release: true
6363
python:
6464
library_type: INTEGRATION

packages/bigframes/CHANGELOG.md

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

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

7+
## [2.43.0](https://github.com/googleapis/google-cloud-python/compare/bigframes-v2.42.0...bigframes-v2.43.0) (2026-06-12)
8+
9+
10+
### Documentation
11+
12+
* add a notebook explaining bqsql magics cell chaining (#17216) ([1a0de4a7701b7fdf4c2593b1960f1194ebc49793](https://github.com/googleapis/google-cloud-python/commit/1a0de4a7701b7fdf4c2593b1960f1194ebc49793))
13+
14+
15+
### Features
16+
17+
* add `bigframes.bigquery.bit_count` and conversion scalar function (#17433) ([7f29823fadb3cff42dbe666f8c7aa33bab3c7021](https://github.com/googleapis/google-cloud-python/commit/7f29823fadb3cff42dbe666f8c7aa33bab3c7021))
18+
19+
20+
### Bug Fixes
21+
22+
* preserve aliases on cast columns and fix star selection in sqlglot (#17394) (#17455) ([145034a345eb3e14ea3f23dfcafa3d2409a09067](https://github.com/googleapis/google-cloud-python/commit/145034a345eb3e14ea3f23dfcafa3d2409a09067))
23+
* bump pyarrow from 15.0.2 to 23.0.1 in /packages/bigframes (#17386) ([f59c2b2aa61316cf04b650933036ef50f6a1f08c](https://github.com/googleapis/google-cloud-python/commit/f59c2b2aa61316cf04b650933036ef50f6a1f08c))
24+
* improve error message when unescaped `{` are found in SQL cells (#17346) ([3a90cc8e867c8a2d2f8060858fde9eda94f80a54](https://github.com/googleapis/google-cloud-python/commit/3a90cc8e867c8a2d2f8060858fde9eda94f80a54))
25+
726
## [2.42.0](https://github.com/googleapis/google-cloud-python/compare/bigframes-v2.41.0...bigframes-v2.42.0) (2026-06-08)
827

928

packages/bigframes/bigframes/core/compile/sqlglot/sqlglot_ir.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,13 @@ def select(
249249
# TODO: Explicitly insert CTEs into plan
250250
if len(selections) > 0:
251251
to_select = [
252-
sge.Alias(
253-
this=expr,
252+
expr
253+
if (isinstance(expr, sge.Alias) and expr.alias == id)
254+
or (isinstance(expr, sge.Column) and expr.name == id)
255+
else sge.Alias(
256+
this=expr.this if isinstance(expr, sge.Alias) else expr,
254257
alias=sql.identifier(id),
255258
)
256-
if expr.alias_or_name != id
257-
else expr
258259
for id, expr in selections
259260
]
260261
new_expr = self.expr.select(*to_select)

packages/bigframes/bigframes/core/sql_nodes.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,14 @@ def _node_expressions(self):
276276

277277
@property
278278
def is_star_selection(self) -> bool:
279-
return tuple(self.ids) == tuple(self.child.ids)
279+
if tuple(self.ids) != tuple(self.child.ids):
280+
return False
281+
for cdef in self.selections:
282+
if not isinstance(cdef.expression, ex.DerefOp):
283+
return False
284+
if cdef.expression.id != cdef.id:
285+
return False
286+
return True
280287

281288
@functools.cache
282289
def get_id_mapping(self) -> dict[identifiers.ColumnId, ex.Expression]:

packages/bigframes/bigframes/session/anonymous_dataset.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import threading
1717
import uuid
1818
import warnings
19+
from concurrent.futures import ThreadPoolExecutor
1920
from typing import List, Optional, Sequence
2021

2122
import google.cloud.bigquery as bigquery
@@ -170,9 +171,19 @@ def _cleanup_old_udfs(self):
170171

171172
def close(self):
172173
"""Delete tables that were created with this session's session_id."""
173-
for table_ref in self._table_ids:
174-
self.bqclient.delete_table(table_ref, not_found_ok=True)
175-
self._table_ids.clear()
174+
if self._table_ids:
175+
try:
176+
with ThreadPoolExecutor() as executor:
177+
futures = [
178+
executor.submit(
179+
self.bqclient.delete_table, table_ref, not_found_ok=True
180+
)
181+
for table_ref in self._table_ids
182+
]
183+
for future in futures:
184+
future.result()
185+
finally:
186+
self._table_ids.clear()
176187

177188
try:
178189
# Before closing the session, attempt to clean up any uncollected,

packages/bigframes/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.42.0"
15+
__version__ = "2.43.0"
1616

1717
# {x-release-please-start-date}
18-
__release_date__ = "2026-06-08"
18+
__release_date__ = "2026-06-12"
1919
# {x-release-please-end}

packages/bigframes/noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def run_system(
354354
"py.test",
355355
"-v",
356356
f"-n={num_workers}",
357+
"--dist=worksteal",
357358
# Any individual test taking longer than 15 mins will be terminated.
358359
f"--timeout={timeout_seconds}",
359360
# Log 20 slowest tests
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# BigQuery DataFrames (bigframes) release procedure
2+
3+
*(Note: bigframes releases are marked with `skip_release: true` in `librarian.yaml` and must be kicked off manually using legacylibrarian.)*
4+
5+
## Setup (First Time Only)
6+
7+
* Install `legacylibrarian`:
8+
9+
go install github.com/googleapis/librarian/cmd/legacylibrarian@latest
10+
11+
* Authenticate with GitHub CLI:
12+
13+
gh auth login
14+
15+
## Release Steps
16+
17+
* Obtain GitHub token:
18+
19+
export LIBRARIAN_GITHUB_TOKEN=$(gh auth token)
20+
21+
* Stash changes (repo must be clean):
22+
23+
git stash -u
24+
25+
* Fetch and checkout base:
26+
27+
git fetch origin main
28+
git fetch origin --tags
29+
git checkout origin/main
30+
31+
* Check image updates:
32+
33+
legacylibrarian update-image --push
34+
35+
* Create release PR:
36+
37+
# Option A: Push directly
38+
legacylibrarian release stage --repo=https://github.com/googleapis/google-cloud-python --library=bigframes --library-version=X.X.X --push
39+
40+
# Option B: Manual edit first (omit --push, edit files in /tmp/librarian-*, commit/push from there)
41+
legacylibrarian release stage --repo=https://github.com/googleapis/google-cloud-python --library=bigframes --library-version=X.X.X
42+
# In /tmp repository:
43+
git commit -a -m "chore: create release" --no-verify # keep librarian config pristine
44+
git push origin HEAD
45+
gh pr create --fill --label "release:pending"
46+
47+
* Post-release restore:
48+
49+
# Move back any stashed/relocated files (like .vscode)
50+
git checkout main
51+
git stash pop

0 commit comments

Comments
 (0)