avichaym opened a new pull request, #4371: URL: https://github.com/apache/flink-cdc/pull/4371
## What is the purpose of the change Fix TIMESTAMPTZ type mapping in the PostgreSQL pipeline connector that causes `NumberFormatException` when writing to the Iceberg sink. `PostgresTypeUtils` mapped `TIMESTAMPTZ` to `ZonedTimestampType` (`TIMESTAMP_WITH_TIME_ZONE`), but the Debezium deserializer only produces `LocalZonedTimestampData` (`TIMESTAMP_WITH_LOCAL_TIME_ZONE`). This type mismatch causes binary data corruption in `BinaryRecordData`, crashing the Iceberg sink's `IcebergTypeUtils.createFieldGetter()` during both snapshot and CDC phases. The existing test `PostgresFullTypesITCase` (line 1211) already expects `TIMESTAMP_LTZ(0)` for TIMESTAMPTZ, confirming the correct mapping. ## Brief change log - `PostgresTypeUtils`: Map `TIMESTAMPTZ` → `TIMESTAMP_LTZ(scale)` (was `ZonedTimestampType`) - `DebeziumEventDeserializationSchema`: Add `convertToZonedTimestamp()` for future `TIMESTAMP_WITH_TIME_ZONE` support - New test: `PostgresTypeUtilsTimestamptzTest` — validates type mapping - `IcebergTypeUtilsTest`: Add assertions for `TIMESTAMP_LTZ` type conversion and field getter ## Verifying this change - New unit tests added (see above) - Validated end-to-end on EKS with Flink 1.20 + CDC 3.6.0: TIMESTAMPTZ data written to Apache Iceberg (S3 Tables) with correct microsecond precision ## Does this pull request potentially affect one of the following parts - Dependencies: no - The public API: no - The runtime per-record code path: no - Anything that affects deployment: no ## Documentation - Does this pull request introduce a new feature? No (bug fix) -- 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]
