hongzhi-gao opened a new pull request, #19203: URL: https://github.com/apache/iotdb/pull/19203
## Description Python query results containing millisecond TIMESTAMP values at the signed int64 boundaries fail under pandas 3.1.1 with `OutOfBoundsDatetime`. The integer Timestamp constructor attempts a finer resolution, and the existing exception paths retry the same overflowing constructor. This caused 13 Python integration failures on `rc/2.0.12`, exposed by the CI run for #19199. Construct timestamps from NumPy `datetime64` with the original unit in the existing fallback paths. This preserves the raw integer and precision, accepts NumPy integer scalars from decoded query columns, and retains the existing behavior for unsupported timezone conversions. The normal constructor path, NaT/null handling, wire protocol and stored data are unchanged. NumPy is already a client dependency. Add focused regression coverage for signed boundaries in ms/us/ns, Python and NumPy scalars, UTC/Etc-UTC formatting, normal timezone conversions and NaT. This PR targets `rc/2.0.12` independently of the C++ TLS backport. ## Validation Executed with Python 3.12: - New regression tests on the old implementation with pandas 3.1.1: **2 failed / 11 passed**, reproducing the positive and negative millisecond-boundary failures. - `python -m pytest iotdb-client/client-py/tests/unit -q` with pandas 3.1.1: **47 passed**. - `python -m pytest iotdb-client/client-py/tests/unit/test_rpc_utils.py -q` with pandas 2.3.3 and 3.0.5: **13 passed** in each environment. - From `iotdb-client/client-py`: `python -m pytest tests/integration/test_treemodel_insert.py::test_insert_tablet tests/integration/test_tablemodel_query.py::test_query_data -q` with pandas 3.1.1: **2 passed**, one existing pandas warning about `unit` on a None input. - `python -m black iotdb-client/client-py/ --check --diff`: **passed**, 76 files unchanged. - `mvn -o -pl iotdb-client/client-py apache-rat:check -Ddevelocity.off=true`: **passed**. - `git diff HEAD^ HEAD --check`: **passed**. The integration tests used the existing Docker fixture with the same release-branch server distribution, Ubuntu 24.04, JDK 17 and 4G node memory. The standard Focal base-image pull was unavailable locally, so a temporary local test image was built from a cached Ubuntu image; no repository Dockerfiles or test fixtures were changed. Remote CI for this new PR has not yet completed. The full Python integration suite and Python 3.15 were not run locally. No performance improvement is claimed; the normal conversion path remains unchanged and NumPy construction is confined to existing fallback paths. -- 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]
