skyyyy955 commented on issue #11219:
URL: https://github.com/apache/paimon/issues/11219#issuecomment-6982649010
Thanks for the detailed repro. One more case worth covering is
`$tags.commit_time`. A tag copies the commit time from its snapshot, so a query
joining the two tables by `snapshot_id` should still see the same commit time
on both sides.
Using your Spark example, create a tag once on snapshot 1, then run the
`SET` and `SELECT` in each of your two JVMs:
```sql
-- Run once on the repro table
CALL paimon.sys.create_tag(
table => 'tz_repro.orders', tag => 'tz_check_11219', snapshot => 1
);
-- Run in both the UTC and Asia/Shanghai JVMs
SET spark.sql.session.timeZone=UTC;
SELECT s.snapshot_id,
s.commit_time AS snapshot_time,
t.commit_time AS tag_time,
timestamp_millis(1794897084761) AS reference_time
FROM paimon.tz_repro.`orders$snapshots` s
JOIN paimon.tz_repro.`orders$tags` t ON s.snapshot_id = t.snapshot_id
WHERE t.tag_name = 'tz_check_11219';
```
From the current code, I’d expect both columns to show `06:31:24.761` in the
UTC JVM and `14:31:24.761` in the Shanghai JVM. The reference should stay at
`06:31:24.761` in both runs. If only `$snapshots.commit_time` switches to UTC,
the two columns would disagree by eight hours in Shanghai. Could the regression
test cover this join too?
--
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]