goutamadwant opened a new pull request, #12286:
URL: https://github.com/apache/seatunnel/pull/12286

   ### Purpose of this pull request
   
   Related to #9785.
   
   Fix schema-aware timestamp literals in the Iceberg sink's 
`CUSTOM_PROCESSING` `custom_sql`. The parser currently uses `LocalDateTime` for 
both Iceberg timestamp types, so a literal such as `'2026-09-12 
10:00:00.123456+05:30'` fails before the delete can run.
   
   For `timestamptz` columns, parse the offset and use Iceberg's existing 
microsecond conversion. This is an Iceberg follow-up, not completion of the 
umbrella issue.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Offset-bearing comparison and `IN`/`NOT IN` literals now resolve to the 
correct UTC instant for `timestamptz` columns.
   
   Offset-free literals retain their existing UTC interpretation. 
Timestamp-without-zone columns and existing file-level delete restrictions are 
unchanged. There are no configuration, dependency or public API changes. EN/ZH 
documentation explains the supported literals and delete restriction.
   
   ### How was this patch tested?
   
   - Reproduced `DateTimeParseException` through `IcebergCatalog.executeSql` 
with the original parser.
   - Added expression tests for UTC, positive/negative offsets, fractional 
precision, pre-epoch comparison boundaries, `IN`/`NOT IN` and invalid literals.
   - Added a local Hadoop-catalog/Parquet integration test that verifies the 
intended time window is removed, adjacent/null records survive, and invalid 
literals or partially matching files do not change the snapshot.
   - Full connector tests on Java 8 and connector `verify` on Java 11: 95 tests 
each, zero failures/errors, one existing metastore-test skip. Both ran with a 
non-UTC JVM timezone. Spotless and whitespace checks pass.
   
   With the corresponding Java version selected:
   
   ```sh
   mvn -o -pl seatunnel-connectors-v2/connector-iceberg test 
'-Dsurefire.jvm.args=-Duser.timezone=America/Los_Angeles 
-Djdk.attach.allowAttachSelf=true'
   mvn -o -pl seatunnel-connectors-v2/connector-iceberg verify 
'-Dsurefire.jvm.args=-Duser.timezone=America/Los_Angeles 
-Djdk.attach.allowAttachSelf=true'
   ```
   
   The catalog test runs locally; it is not a full Zeta or external 
Hive-metastore E2E test.
   
   ### Check list
   
   - [x] No new JAR dependencies; no license/notice additions needed.
   - [x] EN/ZH connector documentation updated.
   - [x] No incompatible changes; no `incompatible-changes.md` update needed.
   - [x] Existing connector only; plugin mapping, distribution, CI labels and 
plugin configuration are unchanged. Regression coverage is included in the 
connector module.


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