ruanhang1993 commented on code in PR #4262:
URL: https://github.com/apache/flink-cdc/pull/4262#discussion_r2958439141


##########
flink-cdc-cli/src/main/java/org/apache/flink/cdc/cli/parser/YamlPipelineDefinitionParser.java:
##########
@@ -226,6 +227,19 @@ private SinkDef toSinkDef(JsonNode sinkNode, 
SchemaChangeBehavior schemaChangeBe
             Arrays.stream(SchemaChangeEventTypeFamily.ALL)
                     .map(SchemaChangeEventType::getTag)
                     .forEach(includedSETypes::add);
+        } else {
+            // CreateTableEvent is always required as the foundation for all 
subsequent processing.
+            // Automatically add it if not explicitly excluded by user.
+            // Use resolveSchemaEvolutionTag to properly handle both exact 
tags and family tags.
+            boolean createTableExplicitlyExcluded =
+                    excludedSETypes.stream()
+                            .flatMap(
+                                    tag -> 
ChangeEventUtils.resolveSchemaEvolutionTag(tag).stream())
+                            .anyMatch(type -> type == 
SchemaChangeEventType.CREATE_TABLE);
+            if (!createTableExplicitlyExcluded
+                    && 
!includedSETypes.contains(SchemaChangeEventType.CREATE_TABLE.getTag())) {
+                
includedSETypes.add(SchemaChangeEventType.CREATE_TABLE.getTag());

Review Comment:
   @Hisoka-X Please update the docs about this behavior changing.



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