1996fanrui opened a new pull request, #30130: URL: https://github.com/apache/flink/pull/30130
## What is the purpose of the change Backport of #29839 to release-2.2. ## Verifying this change - `./mvnw install -DskipTests -Dfast -Pskip-webui-build -pl flink-python,flink-dist -am` (JDK 17): `BUILD SUCCESS`, to provide the Flink distribution the PyFlink tests use. - `python -m pytest pyflink/table/tests/test_utils.py "pyflink/table/tests/test_table_environment_api.py::StreamTableEnvironmentTests::test_collect_timestamp_ignores_local_time_zone"` in `flink-python` (Python 3.11, JDK 17): `9 passed, 20 subtests passed`. - `python -m pytest pyflink/table/tests/test_table_environment_api.py -k collect` (Python 3.11, JDK 17): `4 passed`. - Same fix tests with only the main code (`pyflink/table/utils.py` and `PythonBridgeUtils.java`) reverted to release-2.2 and `flink-python,flink-dist` reinstalled: `8 failed, 8 passed`. All 7 subtests of `test_timestamp_ignores_local_time_zone` fail, and `test_collect_timestamp_ignores_local_time_zone` returns `2020-03-07 17:30` for `TIMESTAMP '2020-03-08 02:30:00'` (JVM in Europe/Berlin, Python in America/Los_Angeles), the shift from the Jira. - `./mvnw -pl flink-python spotless:check checkstyle:check`: passed. - `flake8==7.2.0 --config=tox.ini` on the three changed Python files: no findings. ## Difference from the original | Original commit | Conflict | Byte-identical | Changes | | --- | --- | --- | --- | | f8b1f2ae3a4 | No | Yes | None | ## Notes - Cherry-picked from the release-2.3 commit f8b1f2ae3a4 of #29839. All four changed files on release-2.2 are identical to release-2.3 before that commit; the master commit 449e6d0ae45 conflicts in `test_table_environment_api.py`. - The Jira's fix versions do not list a 2.2.x version yet (2.2.2 is unreleased); it lists 2.2.1 as affected. The bug is present on release-2.2: `PythonBridgeUtils` still pickles a TIMESTAMP via `Timestamp.valueOf` and `pickled_bytes_to_python_converter` still converts it back with `from_sql_type`. ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code 2.1.332 (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
