You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2023/04/14 10:20:50 UTC

[GitHub] [incubator-paimon] JingsongLi commented on a diff in pull request #912: [flink] MySql CDC can now deal with multiple changes in one ALTER TABLE statement

JingsongLi commented on code in PR #912:
URL: https://github.com/apache/incubator-paimon/pull/912#discussion_r1166652059


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/cdc/NewDataFieldListProcessFunction.java:
##########
@@ -21,44 +21,95 @@
 import org.apache.paimon.schema.SchemaChange;
 import org.apache.paimon.schema.SchemaManager;
 import org.apache.paimon.schema.TableSchema;
+import org.apache.paimon.types.DataField;
 import org.apache.paimon.types.DataType;
 import org.apache.paimon.types.DataTypeChecks;
 import org.apache.paimon.types.DataTypeRoot;
+import org.apache.paimon.types.RowType;
 import org.apache.paimon.utils.Preconditions;
 
 import org.apache.flink.streaming.api.functions.ProcessFunction;
 import org.apache.flink.util.Collector;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 /**
- * A {@link ProcessFunction} to handle {@link SchemaChange}.
+ * A {@link ProcessFunction} to handle schema changes. New schema is represented by a list of {@link
+ * DataField}s.
  *
  * <p>NOTE: To avoid concurrent schema changes, the parallelism of this {@link ProcessFunction} must
  * be 1.
  */
-public class SchemaChangeProcessFunction extends ProcessFunction<SchemaChange, Void> {
+public class NewDataFieldListProcessFunction extends ProcessFunction<List<DataField>, Void> {

Review Comment:
   `UpdateDataField`? New let me think about only add columns...



-- 
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: issues-unsubscribe@paimon.apache.org

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