Skip to content

feat: add dt.tz_localize()#2469

Merged
sycai merged 6 commits intomainfrom
sycai_tz_localize
Feb 20, 2026
Merged

feat: add dt.tz_localize()#2469
sycai merged 6 commits intomainfrom
sycai_tz_localize

Conversation

@sycai
Copy link
Contributor

@sycai sycai commented Feb 19, 2026

Only None and "UTC" time zones are supported in this version.

Fixes b/481069646 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Feb 19, 2026
@sycai sycai marked this pull request as ready for review February 19, 2026 23:19
@sycai sycai requested a review from a team as a code owner February 19, 2026 23:19
@scalar_op_compiler.register_unary_op(ops.ToDatetimeOp, pass_op=True)
def to_datetime_op_impl(x: ibis_types.Value, op: ops.ToDatetimeOp):
if x.type() == ibis_dtypes.str:
if x.type() in (ibis_dtypes.str, ibis_dtypes.Timestamp("UTC")): # type: ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify if the SQLGlot compiler requires similar handling? If it does, please enable bpd.options.experiments.sql_compiler = "experimental" and run the doc tests below. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!! I forgot to update the SQLGlot compiler.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify if the SQLGlot compiler requires similar handling? If it does, please enable bpd.options.experiments.sql_compiler = "experimental" and run the doc tests below. Thanks!

Updated the SQLGlot compiler and added tests. Also tested the code manually.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sycai sycai requested a review from chelsea-lin February 20, 2026 01:04
@sycai
Copy link
Contributor Author

sycai commented Feb 20, 2026

The notebook and sample test failures are related to multi-modals.

@sycai sycai merged commit f70f93a into main Feb 20, 2026
22 of 24 checks passed
@sycai sycai deleted the sycai_tz_localize branch February 20, 2026 18:29
chelsea-lin added a commit that referenced this pull request Mar 4, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.3
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
<details><summary>bigframes: v2.37.0</summary>

##
[v2.37.0](v2.36.0...v2.37.0)
(2026-03-03)

### Features

* Add cloud_function_cpus option to remote_function (#2475)
([4caf74c](4caf74cc))

* add display.render_mode to control DataFrame/Series visualization
(#2413)
([7813eaa](7813eaa6))

* Support pd.col expressions with .loc and getitem (#2473)
([ae5c8b3](ae5c8b32))

* add support for Python 3.14 (#2232)
([c25a6d0](c25a6d01))

* Support pd.col simple aggregates (#2480)
([cb00daa](cb00daab))

* add dt.tz_localize() (#2469)
([f70f93a](f70f93a1))

* Update bigquery.ai.generate_table output_schema to allow Mapping type
(#2463)
([f7fd189](f7fd1895))

### Bug Fixes

* upload local data through write API if nested JSONs detected (#2478)
([01dc5a3](01dc5a34))

* allow IsInOp with same dtypes regardless nullable (#2466)
([1d81b41](1d81b414))

### Documentation

* Add code examples to configuration docstrings (#2352)
([3c21993](3c21993e))

* Move readme content to new User Guide section (#2464)
([61a9484](61a94845))

* add code sample and docstring for bpd.options.experiments.sql_compiler
(#2474)
([867951b](867951bc))

* use direct API for image (#2465)
([8a1a82f](8a1a82f7))

* Fix recall_score doc example (#2477)
([a6f499c](a6f499c1))

* Skip inherited methods, use autosummary only for big classes (#2470)
([a951249](a9512498))

* add bigframes default connection warning (#2471)
([f1bbba2](f1bbba23))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants