ashulin commented on code in PR #4067:
URL:
https://github.com/apache/incubator-seatunnel/pull/4067#discussion_r1097163432
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/IncrementalSource.java:
##########
@@ -76,6 +79,14 @@
protected StopMode stopMode;
protected DebeziumDeserializationSchema<T> deserializationSchema;
+ protected SeaTunnelDataType<SeaTunnelRow> dataType;
+ protected ReadonlyConfig options;
+
+ protected IncrementalSource(ReadonlyConfig options,
SeaTunnelDataType<SeaTunnelRow> dataType) {
+ this.options = options;
+ this.dataType = dataType;
Review Comment:
The `#prepare` method will not be called in the new process, please
initialize the remaining `fields`.
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializeSchema.java:
##########
@@ -90,28 +114,34 @@ public void deserialize(SourceRecord record,
Collector<SeaTunnelRow> collector)
Schema valueSchema = record.valueSchema();
Struct sourceStruct =
messageStruct.getStruct(Envelope.FieldName.SOURCE);
- // TODO: multi-table
+ String database = sourceStruct.getString(DATABASE_NAME_KEY);
String tableName =
sourceStruct.getString(AbstractSourceInfo.TABLE_NAME_KEY);
+ String tableId = database + ":" + tableName;
+ SeaTunnelRowDebeziumDeserializationConverters converters =
multipleRowConverters.getOrDefault(tableId, singleRowConverter);
Review Comment:
The judgment on the single table is missing
--
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]