Caideyipi commented on code in PR #19248:
URL: https://github.com/apache/iotdb/pull/19248#discussion_r4549657580


##########
iotdb-client/client-py/iotdb/utils/rpc_utils.py:
##########
@@ -81,10 +82,16 @@ def convert_to_timestamp(time: int, precision: str, 
timezone: str):
     try:
         ts = pd.Timestamp(time, unit=precision, tz=timezone)
     except OutOfBoundsDatetime:
+        # A datetime64 scalar keeps the input unit; pandas 3.1 otherwise 
rescales
+        # numeric input to microseconds, which can overflow millisecond values.
         try:
-            ts = pd.Timestamp(time, unit=precision).tz_localize(timezone)
-        except NotImplementedError:
-            return pd.Timestamp(time, unit=precision)
+            ts = (

Review Comment:
   [P2] Keep focused regression coverage in the final diff
   
   The second commit removes `tests/unit/test_rpc_utils.py`, so this overflow 
path has no regression test in the PR. Please retain at least a compact test 
for extreme millisecond values under pandas 3.1, including a non-UTC timezone 
and signed-boundary values; the current Python CI can pass without exercising 
the inputs that triggered this failure.



-- 
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]

Reply via email to