You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "doyong365 (via GitHub)" <gi...@apache.org> on 2026/04/01 04:45:09 UTC

[I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

doyong365 opened a new issue, #10685:
URL: https://github.com/apache/seatunnel/issues/10685

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   NTZ timestamp columns from source databases are stored as LTZ in the target without timezone conversion. SeaTunnel's JDBC connectors do not distinguish NTZ from LTZ — both are mapped to the same internal type (`SqlType.TIMESTAMP` / `LOCAL_DATE_TIME_TYPE`) and unconditionally written as LTZ to the target (e.g. Iceberg `TimestampType.withZone()`). When reading, `rs.getTimestamp()` → `.toLocalDateTime()` applies the JVM timezone, and `Timestamp.valueOf(LocalDateTime).toInstant()` in the Spark layer reverses it — the two offsets cancel out, leaving the wall-clock value stored directly as UTC regardless of the source timezone.
   
   **Affected source types per database:**
   
   | Source DB | Type | NTZ/LTZ | Result |
   |---|---|---|---|
   | MySQL | `DATETIME` | NTZ | ⛔ Stored as LTZ |
   | MySQL | `TIMESTAMP` | LTZ | ✅ Correct |
   | MariaDB | `DATETIME` | NTZ | ⛔ Stored as LTZ |
   | PostgreSQL | `timestamp` | NTZ | ⛔ Stored as LTZ |
   | PostgreSQL | `timestamptz` | LTZ | ✅ Correct |
   | Oracle | `DATE` | NTZ | ⛔ Stored as LTZ |
   | Oracle | `TIMESTAMP` | NTZ | ⛔ Stored as LTZ |
   | MSSQL | `DATETIME` | NTZ | ⛔ Stored as LTZ |
   | DB2 | `TIMESTAMP` | NTZ | ⛔ Stored as LTZ |
   
   **Verified with the following test cases (Spark engine, JVM=KST+9):**
   
   | Source TZ | Source type | Source value | Result |
   |---|---|---|---|
   | KST(+9) | TIMESTAMP_NTZ | 2026-01-01 00:00:00 | 2026-01-01 00:00:00 UTC ❌ |
   | KST(+9) | TIMESTAMP_LTZ | 2026-01-01 00:00:00 KST | 2025-12-31 15:00:00 UTC ✅ |
   | UTC | TIMESTAMP_NTZ | 2026-01-01 00:00:00 | 2026-01-01 00:00:00 UTC ➖ |
   | CST(-6) | TIMESTAMP_NTZ | 2026-01-01 00:00:00 | 2026-01-01 00:00:00 UTC ❌ |
   | CST(-6) | TIMESTAMP_LTZ | 2026-01-01 00:00:00 CST | 2026-01-01 06:00:00 UTC ✅ |
   
   The NTZ case at UTC timezone appears correct only by coincidence (zero offset), not because of correct handling.
   
   ### Root cause
   
   The core issue is that SeaTunnel's internal type system has no way to distinguish NTZ from LTZ timestamp types. All DB-specific TypeConverters collapse both into the same internal type (`SqlType.TIMESTAMP` / `LOCAL_DATE_TIME_TYPE`), and the entire pipeline unconditionally writes every timestamp as LTZ to the target.
   
   **1. TypeConverters — NTZ and LTZ both mapped to `LOCAL_DATE_TIME_TYPE`**
   All DB-specific TypeConverters map NTZ and LTZ timestamp types to the identical SeaTunnel internal type, making it structurally impossible to distinguish them downstream.
   - `MySqlTypeConverter.java` `convert(BasicTypeDefine)` — `DATETIME` (NTZ) and `TIMESTAMP` (LTZ) both map to `LOCAL_DATE_TIME_TYPE`
   - `PostgresTypeConverter.java` `convert(BasicTypeDefine)` — `timestamp` (NTZ) and `timestamptz` (LTZ) both map to `LOCAL_DATE_TIME_TYPE`
   - `OracleTypeConverter.java` `convert(BasicTypeDefine)` — `DATE`, `TIMESTAMP` (NTZ) and `TIMESTAMP WITH TIME ZONE`, `TIMESTAMP WITH LOCAL TIME ZONE` (LTZ) all map to `LOCAL_DATE_TIME_TYPE`
   - `SqlServerTypeConverter.java` `convert(BasicTypeDefine)` — `DATETIME`, `DATETIME2` (NTZ) and `DATETIMEOFFSET` (LTZ) all map to `LOCAL_DATE_TIME_TYPE`
   - `GenericTypeConverter.java` `convert(BasicTypeDefine)` — `Types.TIMESTAMP` (covers both NTZ and LTZ reported by JDBC driver) maps to `LOCAL_DATE_TIME_TYPE`
   
   **2. `AbstractJdbcRowConverter.java` — `toInternal()`**
   NTZ and LTZ columns are read through the same code path. `rs.getTimestamp()` applies the JVM default timezone, which is correct for LTZ but corrupts NTZ wall-clock values. There is no separate `TIMESTAMP_TZ` case.
   
   **3. `AbstractJdbcRowConverter.java` — `setValueToStatementByDataType()`**
   On write, `Timestamp.valueOf(LocalDateTime)` re-applies the JVM default timezone, shifting the epoch value regardless of whether the original source type was NTZ or LTZ.
   
   **4. `InternalRowConverter.java` — `convert()` / `reconvert()`**
   In the Spark engine translation layer, `toLocalDateTime()` in `AbstractJdbcRowConverter` first maps the NTZ wall-clock value to a `LocalDateTime` while applying the JVM timezone offset (e.g. `2026-01-01T00:00:00Z` epoch → KST+9 → `2026-01-01T09:00:00`), and then `Timestamp.valueOf()` in `InternalRowConverter` immediately reverses it (e.g. KST-9 → epoch `2026-01-01T00:00:00Z`). The two JVM timezone offsets cancel each other out, so the NTZ wall-clock numeric value is preserved as-is in UTC — meaning a value that represents `2026-01-01 00:00:00 KST` is incorrectly stored as `2026-01-01 00:00:00 UTC` instead of the correct `2025-12-31 15:00:00 UTC`.
   
   **5. `TypeConverterUtils.java` — `convert(SeaTunnelDataType)`**
   SeaTunnel's `TIMESTAMP` (NTZ) is mapped to Spark's `TimestampType` which is always UTC-based (LTZ). There is no NTZ-aware handling anywhere in the codebase.
   
   **6. `IcebergTypeMapper.java` — `toIcebergType()`**
   SeaTunnel's `TIMESTAMP` is unconditionally mapped to `Types.TimestampType.withZone()` (LTZ). `withoutZone()` (NTZ) is never called.
   
   ### Expected behavior
   - NTZ source columns should be stored as NTZ in the target (e.g. Iceberg TimestampType.withoutZone())
   - LTZ source columns should be stored as LTZ in the target (e.g. Iceberg TimestampType.withZone())
   - The distinction should be preserved end-to-end through the SeaTunnel type system using SqlType.TIMESTAMP (NTZ) vs SqlType.TIMESTAMP_TZ (LTZ)
   
   ### Actual behavior
   All NTZ timestamp columns are stored as LTZ in the target. The wall-clock value is written directly as UTC without timezone conversion, because SeaTunnel has no mechanism to carry NTZ/LTZ distinction through its internal type system.
   
   ### SeaTunnel Version
   
   2.3.10
   
   ### SeaTunnel Config
   
   ```conf
   env {
     parallelism = 1
     job.mode = "BATCH"
   }
   
   source {
     Jdbc {
       url = "jdbc:mysql://localhost:3306/testdb"
       driver = "com.mysql.cj.jdbc.Driver"
       user = "root"
       password = "password"
       query = "SELECT datetime_col, timestamp_col FROM test_table"
     }
   }
   
   sink {
     Iceberg {
       catalog_name = "local"
       namespace = "default"
       table = "test_iceberg"
     }
   }
   ```
   
   ### Running Command
   
   ```shell
   ./bin/start-seatunnel-spark-3-connector-v2.sh --config config/test.conf
   ```
   
   ### Error Exception
   
   ```log
   No explicit exception is thrown. The job completes successfully but NTZ timestamp values are stored with incorrect timezone semantics in the target.
   ```
   
   ### Zeta or Flink or Spark Version
   
   zeta 2.3.10
   flink 1.17.2
   spark 3.3.3
   
   ### Java or Scala Version
   
   Java 11
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "julianbradford19-png (via GitHub)" <gi...@apache.org>.
julianbradford19-png commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4168766583

   Thanks for the detailed analysis! Yes, it looks like the NTZ timestamps are
   treated as LTZ because toLocalDateTime is applied, causing the wall-clock
   value to be written as UTC. Your explanation aligns with my observations.
   
   On Wed, Apr 1, 2026, 3:47 AM Chan hae OH ***@***.***> wrote:
   
   > *och5351* left a comment (apache/seatunnel#10685)
   > <https://github.com/apache/seatunnel/issues/10685#issuecomment-4168522130>
   >
   > It seems to be called a UTC timestamp because toLocalDateTime is used when
   > converting the data.
   > image.png (view on web)
   > <https://github.com/user-attachments/assets/7cd7596b-922e-45f1-8d8e-00682c329477> image.png
   > (view on web)
   > <https://github.com/user-attachments/assets/3c3a53fe-0be9-4199-8186-8c6dbaaa7057>
   >
   > If I am wrong, please have someone leave a correction reply.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/seatunnel/issues/10685?email_source=notifications&email_token=B74KUG5APXDYQE2LUIBDCET4TTJRFA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJWHA2TEMRRGMYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4168522130>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/B74KUG4QBTFAVY5SLU54ZD34TTJRFAVCNFSM6AAAAACXIUCELKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCNRYGUZDEMJTGA>
   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4170159940

   > Hello, [@dybyte](https://github.com/dybyte)!
   > 
   > If this change needs to be handled as a hotfix, would you please submit a PR and review it, [@doyong365](https://github.com/doyong365)?
   > 
   > I believe it is very important to welcome new contributors to Seatunnel.
   > 
   > I think this is a good direction, provided [@doyong365](https://github.com/doyong365) is okay with it, but I would like to ask for the committer's opinion on the matter.
   
   I think it’s fine to let the contributor take this first.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4168522130

   It seems to be called a UTC timestamp because toLocalDateTime is used when converting the data.
   
   <img width="1030" height="430" alt="Image" src="https://github.com/user-attachments/assets/7cd7596b-922e-45f1-8d8e-00682c329477" />
   
   <img width="721" height="718" alt="Image" src="https://github.com/user-attachments/assets/3c3a53fe-0be9-4199-8186-8c6dbaaa7057" />
   
   If I am wrong, please have someone leave a correction reply.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4168921213

   Good catch, thanks for reporting this.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #10685: [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table
URL: https://github.com/apache/seatunnel/issues/10685


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "doyong365 (via GitHub)" <gi...@apache.org>.
doyong365 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4173623915

   Hello, @dybyte . Thank you for reviewing.
   I'd like to work on this issue.
   
   I'll submit a PR shortly.
   Let me know if there are any concerns with this approach.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "doyong365 (via GitHub)" <gi...@apache.org>.
doyong365 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4204562133

   @dybyte @och5351 @DanielLeens 
   Hi all,
   I have submitted a PR (#10724) to fix this issue.
   The problem was that the JDBC Source mapped both timezone-naive (e.g., MySQL `DATETIME`) and timezone-aware (e.g., MySQL `TIMESTAMP`) columns to SeaTunnel's internal `TIMESTAMP` type, losing the timezone semantics.
   In the PR, I explicitly separated them:
   *   NTZ (No Time Zone) -> SeaTunnel `TIMESTAMP`
   *   LTZ (Local Time Zone) -> SeaTunnel `TIMESTAMP_TZ`
   I also added E2E tests using real MySQL and PostgreSQL containers to verify that the timestamps are correctly persisted into Iceberg with their proper timezone metadata (`timestamp` vs `timestamptz`).
   Please feel free to review it. Thanks!


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "doyong365 (via GitHub)" <gi...@apache.org>.
doyong365 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4182650044

   @och5351 
   Correct. To resolve this issue, we must upgrade the spark version.
   
   @dybyte 
   Changing the code without an upgrade won't fix the issue.
   Could you think of the spark version upgrade that the seatunnel supports?
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "julianbradford19-png (via GitHub)" <gi...@apache.org>.
julianbradford19-png commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4184012405

   Yes, please!
   
   On Fri, Apr 3, 2026, 9:04 AM Doyeon Kim ***@***.***> wrote:
   
   > *dybyte* left a comment (apache/seatunnel#10685)
   > <https://github.com/apache/seatunnel/issues/10685#issuecomment-4183608744>
   >
   > @och5351 <https://github.com/och5351> Correct. To resolve this issue, we
   > must upgrade the spark version.
   >
   > @dybyte <https://github.com/dybyte> Changing the code without an upgrade
   > won't fix the issue. Could you think of the spark version upgrade that the
   > seatunnel supports?
   >
   > Currently, SeaTunnel officially supports Spark 2.4 and 3.3. Given that, I
   > think we should first address this issue within SeaTunnel itself, rather
   > than depending on newer Spark features.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/seatunnel/issues/10685?email_source=notifications&email_token=B74KUG3J7DBQFNAQDXYYXV34T7AFJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJYGM3DAOBXGQ2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4183608744>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/B74KUGYYW3LASP7BTHDFHLL4T7AFJAVCNFSM6AAAAACXIUCELKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOBTGYYDQNZUGQ>
   > .
   > You are receiving this because you commented.Message ID:
   > ***@***.***>
   >
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4185639150

   I found the last PR you submitted.
   
   <img width="904" height="247" alt="Image" src="https://github.com/user-attachments/assets/fc0a3ba1-c907-431c-89c6-15639d0fbe87" />
   
   I have confirmed that the PR (fix) was branched off from the development branch, so I will take note of that.
   
   Please let me know if there are any errors.
   
   Thank you!
   
   Hi, @doyong365!
   
   I think it would be good to refer to this part.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4204671890

   Thanks for linking the PR.
   
   I checked the current metadata and code path again. `#10724` is now linked to this issue, it targets `dev`, and the direction is aligned with the real problem here: separating NTZ and LTZ semantics instead of treating everything as one timestamp path.
   
   From the current PR metadata, it is mergeable and mainly waiting for review/checks, so this issue is already moving in the right direction.
   
   The key parts we should continue validating in the PR are:
   1. JDBC source-side type distinction
   2. Iceberg type mapping
   3. end-to-end coverage for both NTZ and TZ-aware timestamp behavior
   
   So I suggest we continue the detailed discussion on `#10724` and keep this issue open until that PR is reviewed and merged.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "julianbradford19-png (via GitHub)" <gi...@apache.org>.
julianbradford19-png commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4206851759

   Thanks for the update.
   
   On Wed, Apr 8, 2026, 2:53 AM Daniel ***@***.***> wrote:
   
   > *DanielLeens* left a comment (apache/seatunnel#10685)
   > <https://github.com/apache/seatunnel/issues/10685#issuecomment-4204671890>
   >
   > Thanks for linking the PR.
   >
   > I checked the current metadata and code path again. #10724 is now linked
   > to this issue, it targets dev, and the direction is aligned with the real
   > problem here: separating NTZ and LTZ semantics instead of treating
   > everything as one timestamp path.
   >
   > From the current PR metadata, it is mergeable and mainly waiting for
   > review/checks, so this issue is already moving in the right direction.
   >
   > The key parts we should continue validating in the PR are:
   >
   >    1. JDBC source-side type distinction
   >    2. Iceberg type mapping
   >    3. end-to-end coverage for both NTZ and TZ-aware timestamp behavior
   >
   > So I suggest we continue the detailed discussion on #10724 and keep this
   > issue open until that PR is reviewed and merged.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/seatunnel/issues/10685#issuecomment-4204671890>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/B74KUG6IGI2GTRKLLLT3EXT4UYAOZAVCNFSM6AAAAACXIUCELKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEMBUGY3TCOBZGA>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4173719766

   Hello, @dybyte!
   
   Thank you for your positive response.
   
   Hello, @doyoung365 !
   
   Thank you for your active cooperation.
   
   If you don't mind, I would like to help you.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4214310083

   Thanks.
   
   Since PR #10724 is already open on `dev`, this issue now looks like "problem confirmed, fix under review" rather than an untriaged bug.
   
   The remaining validation should stay centered in the PR:
   1. JDBC source-side NTZ/LTZ distinction
   2. Iceberg type mapping
   3. E2E coverage for both timezone-naive and timezone-aware timestamp behavior
   
   If no new root-cause information appears, I suggest keeping the detailed technical discussion on #10724 from here.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4183608744

   > [@och5351](https://github.com/och5351) Correct. To resolve this issue, we must upgrade the spark version.
   > 
   > [@dybyte](https://github.com/dybyte) Changing the code without an upgrade won't fix the issue. Could you think of the spark version upgrade that the seatunnel supports?
   
   Currently, SeaTunnel officially supports Spark 2.4 and 3.3. Given that, I think we should first address this issue within SeaTunnel itself, rather than depending on newer Spark features.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4169114723

   Hello, @dybyte!
   
   If this change needs to be handled as a hotfix, would you please submit a PR and review it, @doyong365?
   
   I believe it is very important to welcome new contributors to Seatunnel.
   
   I think this is a good direction, provided @doyong365 is okay with it, but I would like to ask for the committer's opinion on the matter.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4175005631

   Hello, @dybyte
   
   Which branch should I branch this issue into?
   
   * main -> hotfix?
   * develop -> issue number?
   
   I would appreciate it if you could let me know when you have time!
   
   cc. @doyong365 


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "och5351 (via GitHub)" <gi...@apache.org>.
och5351 commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4185556830

   Hi, @dybyte , @julianbradford19-png !
   
   You're right. I share the same sentiment.
   That is why I suggested separating this version related issue issue into a separate improvement proposal.
   
   BTW, how should we branch this issue?
   Should we branch off from the main branch, or from the development branch?
   
   It was my mistake not to find the hotfix for this project in the documentation.
   Could you please share your branching strategy?
   
   > https://seatunnel.apache.org/community/contribution_guide/contribute#contributing-bug-reports
   
   Best regards!
   
   > Hello, [@dybyte](https://github.com/dybyte)
   > 
   > Which branch should we branch this issue into?
   > 
   > * main -> hotfix?
   > * develop -> issue number?
   > 
   > I would appreciate it if you could let me know when you have time!
   
   
   
   cc. @doyong365 
   
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] [connector-jdbc] [connector-iceberg] All NTZ timestamp columns are stored as LTZ in iceberg table [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10685:
URL: https://github.com/apache/seatunnel/issues/10685#issuecomment-4199313824

   Thanks everyone for pushing the analysis forward here.
   
   I checked the current SeaTunnel code path again, and this still looks like a real SeaTunnel-side timestamp semantic issue in the Iceberg path, not mainly a Spark-version problem.
   
   What the current code does is roughly:
   1. JDBC reads a normal `TIMESTAMP` into `LocalDateTime`
   2. Iceberg type mapping turns SeaTunnel `TIMESTAMP` into `TimestampType.withZone()`
   3. when writing, `LocalDateTime` is then converted using the JVM default timezone and adjusted to UTC
   
   That means a value which was effectively handled as timestamp-without-time-zone on the source side can be written as timestamp-with-time-zone semantics on the Iceberg side. That matches the wall-clock shift reported in this issue.
   
   So I agree with keeping this issue focused on the SeaTunnel fix itself.
   
   My suggestion for the next step:
   - keep this issue scoped to the Iceberg timestamp semantic fix
   - prepare the PR from the `dev` branch
   - include tests for both `TIMESTAMP` and `TIMESTAMP_TZ` behavior so we do not regress again
   
   The Spark upgrade discussion is still valuable, but it is a different topic and should be tracked in a separate enhancement issue/PR instead of being mixed into this fix.
   
   If @doyong365 is taking this one, that direction looks good to me. A focused PR would be very welcome.
   


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org