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


##########
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:
##########
@@ -234,6 +234,32 @@ public void 
enterAlterByRenameColumn(MySqlParser.AlterByRenameColumnContext ctx)
         super.enterAlterByRenameColumn(ctx);
     }
 
+    @Override
+    public void 
enterAlterByModifyColumn(MySqlParser.AlterByModifyColumnContext ctx) {
+        String oldColumnName = parser.parseName(ctx.uid(0));
+        ColumnEditor columnEditor = Column.editor().name(oldColumnName);
+        columnEditor.unsetDefaultValueExpression();

Review Comment:
   @hk-lrzy Thanks for this PR.
   `MODIFY` event is a difficult change event to support.
   
   According to mysql 
doc(https://dev.mysql.com/doc/refman/8.4/en/alter-table.html), multi parts 
about this column may be changed from this DDL.
   For the example in this doc, not only the data type, but also the default 
value is changed. But we cannot get that change from this message.
   ![截屏2024-07-29 下午4 03 
32](https://github.com/user-attachments/assets/7de34fa2-0497-4165-b125-df008ba5ba53)
   
   We have plans to support changes in default values. Please add some notes 
about this problem here.



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