fengruotj opened a new pull request, #11286:
URL: https://github.com/apache/paimon/pull/11286

   Implements the java language proposed in 
https://github.com/apache/paimon/issues/11219
   
   ### Purpose
   
   Fixes time zone handling for `commit_time` in the `$snapshots` and `$tags` 
system tables. Both columns represent the snapshot commit instant. Previously, 
the Java implementation converted the stored epoch milliseconds to a local 
`TIMESTAMP(3)` using the JVM time zone. When the JVM and Spark session used 
different time zones, comparisons against an absolute timestamp could return 
incorrect results.
   
   This PR changes both columns to `TIMESTAMP_LTZ(3)` in Java and constructs 
their values directly from the stored epoch milliseconds.
   
   PyPaimon will depend on `paimon-rust`. Follow-up changes in `paimon-rust` 
and PyPaimon will align the `commit_time` type and time zone handling with the 
Java implementation.
   
   ### Tests
   
   - Updates `SnapshotsTableTest` and `TagsTableTest` to verify the 
`commit_time` column type and value.
   - Adds a Spark SQL regression test with the JVM time zone set to 
`Asia/Shanghai` and the session time zone set to `UTC`. It verifies that a 
timestamp filter includes the expected snapshot and that 
`unix_millis(commit_time)` returns the original snapshot epoch milliseconds for 
both the snapshot and its tag.


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