jackylee-ch opened a new pull request, #10356:
URL: https://github.com/apache/paimon/pull/10356

   ### Purpose
   
   `LocalFileIO.write_avro` recursively attaches UTC to naive datetimes nested 
in ROW/ARRAY/MAP values, but `PyArrowFileIO` (OSS/S3/GCS) and 
`HdfsNativeFileIO` normalized only top-level column values. On a non-UTC host, 
fastavro interprets a naive `datetime` using the host timezone, so a naive 
`TIMESTAMP` nested in a struct or list is persisted shifted by the host offset 
— silent data corruption on the object-store and HDFS Avro write paths that the 
local path already handled.
   
   This moves the recursive normalizer onto `FileIO` and uses it in all three 
`write_avro` implementations.
   
   ### Tests
   
   `data_types_test.py`: the existing 
`test_avro_nested_timestamp_roundtrips_on_non_utc_host` (LocalFileIO) now 
exercises the shared helper; a new 
`test_pyarrow_file_io_avro_normalizes_nested_naive_timestamps` asserts a nested 
`TIMESTAMP` survives a `PyArrowFileIO.write_avro` round-trip under 
`TZ=Asia/Shanghai`. Disabling the recursion fails both.
   
   ### API and Format
   
   No change.
   
   ### Documentation
   
   No change.
   


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