p-eye commented on code in PR #28498:
URL: https://github.com/apache/flink/pull/28498#discussion_r3556731559
##########
flink-formats/flink-avro-confluent-registry/src/main/java/org/apache/flink/formats/avro/registry/confluent/debezium/DebeziumAvroSerializationSchema.java:
##########
@@ -81,15 +81,15 @@ public DebeziumAvroSerializationSchema(
validateSchemaString(schemaString, debeziumAvroRowType);
Schema schema =
schemaString == null
- ?
AvroSchemaConverter.convertToSchema(debeziumAvroRowType)
+ ?
AvroSchemaConverter.convertToSchema(debeziumAvroRowType, false)
Review Comment:
You're right. Since this PR is scoped to adding read metadata, I've reverted
the serialization path to prevent unnecessary breakage for existing sinks.
Changes:
- Serialization (Write): Reverted to 1-arg default
(legacyTimestampMapping=true) for backward compatibility.
- Deserialization (Read): Kept at false to support TIMESTAMP_LTZ metadata
(e.g., ingestion-timestamp).
Why this read/write asymmetry is safe here:
1. Source-First Format: Debezium is primarily used as a source (CDC).
Round-trip scenarios (Flink → Debezium sink) are extremely rare.
2. Read-Only Metadata: The newly added metadata is read-only and is never
written back to the Debezium format.
3. No Structural Breakage: Physical columns (before/after) still maintain
their original timestamp-millis schema on the write path.
--
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]