[Bug] Convert timestamp_ltz field contents using local time zone
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
0.8
### Compute Engine
flink
### Minimal reproduce step
1. Create a mysql table containing the timestamp type, and specify the time zone for mysql server to be UTC+8
2. Use flink-cdc to import the data of the table into kafka
3. Create a paimon table, which uses a timestamp_ltz type field to store the value of the timestamp type field in mysql
4. If you query the paimon table in UTC+8, you will find that there are still 8 hours missing
### What doesn't meet your expectations?
The content of the timestamp_ltz field retrieved from the Paimon table should be the same as in mysql
### Anything else?
I think the root cause is that we use the utc time zone to read the data from kafka, but use the current time zone to write the data to paimon.


### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal reproduction involving MySQL, Flink CDC, Kafka, and a Paimon timestamp_ltz field, comparing results under UTC+8. Trace whether Kafka data is read in UTC and written to Paimon in the current time zone; done means querying the Paimon table returns the same timestamp as MySQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka, mysql
- Domain
- data-engineering, databases, stream-processing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100