lvyanquan commented on code in PR #3893:
URL: https://github.com/apache/flink-cdc/pull/3893#discussion_r2964097880


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/source/parser/CustomAlterTableParserListener.java:
##########
@@ -479,14 +487,26 @@ public void 
enterTableOptionComment(MySqlParser.TableOptionCommentContext ctx) {
                     () -> {
                         if (ctx.COMMENT() != null) {
                             tableEditor.setComment(
-                                    
parser.withoutQuotes(ctx.STRING_LITERAL().getText()));
+                                    AbstractDdlParser.withoutQuotes(
+                                            ctx.STRING_LITERAL().getText()));
                         }
                     },
                     tableEditor);
         }
         super.enterTableOptionComment(ctx);
     }
 
+    @Override
+    public void exitTableOptionComment(MySqlParser.TableOptionCommentContext 
ctx) {
+        if (!parser.skipComments() && tableEditor.hasComment()) {
+            changes.add(
+                    new AlterTableCommentEvent(

Review Comment:
   This method will also be called when processing `CREATE TABLE` event, which 
is not as expected.



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