[FLINK-37203] Alter table comment or column comment#3893
[FLINK-37203] Alter table comment or column comment#3893ChaomingZhangCN wants to merge 5 commits intoapache:masterfrom
Conversation
|
@lvyanquan @leonardBang PTAL. |
...java/org/apache/flink/cdc/connectors/mysql/source/parser/CustomAlterTableParserListener.java
Show resolved
Hide resolved
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/event/AlterTableCommentEvent.java
Show resolved
Hide resolved
|
@yuxiqian Can you help review? |
|
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 60 days if no further activity occurs. |
|
Hi @ChaomingZhangCN, I apologize for not reviewing your changes in time during the past period due to other commitments. I believe this modification is reasonable. You can rebase with master (there may be conflicts), and I will review it in the coming days. |
No problem at all, thank you for the update! I appreciate your trust in the changes. I'll rebase with master and address any conflicts. Looking forward to your feedback in the coming days. |
e405d13 to
9b92048
Compare
There was a problem hiding this comment.
Pull request overview
This pull request implements support for altering table comments and column comments in Flink CDC, as tracked in JIRA issue FLINK-37203. The implementation introduces a new AlterTableCommentEvent schema change event and extends AlterColumnTypeEvent to carry column comments during type alterations.
Changes:
- Added new
AlterTableCommentEventclass and associated serialization, visitor, and type infrastructure - Extended
AlterColumnTypeEventto include acommentsmap for tracking column comments during type changes - Updated MySQL connector to parse and emit table comment alterations and column comment changes
- Implemented comment handling in multiple sink connectors (Paimon, MaxCompute, OceanBase, Doris, Values)
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| AlterTableCommentEvent.java | New event class representing ALTER TABLE COMMENT DDL |
| AlterColumnTypeEvent.java | Extended to support column comments with a new comments field |
| AlterTableCommentEventSerializer.java | Serializer for the new AlterTableCommentEvent |
| SchemaChangeEventType.java | Added ALTER_TABLE_COMMENT enum value |
| SchemaChangeEventTypeFamily.java | Included ALTER_TABLE_COMMENT in TABLE family |
| AlterTableCommentEventVisitor.java | New visitor interface for table comment events |
| SchemaChangeEventVisitor.java | Updated to handle AlterTableCommentEvent |
| CustomAlterTableParserListener.java | MySQL parser updated to capture table and column comments |
| CustomMySqlAntlrDdlParserListener.java | Registered AlterTableParserListener |
| Schema.java | Added copy method to replace schema comment |
| SchemaUtils.java | Updated to apply AlterTableCommentEvent to schemas |
| SchemaMergingUtils.java | Enhanced to carry comments during schema merging |
| ValuesDatabase.java | Implemented table and column comment support |
| PaimonMetadataApplier.java | Added handler for AlterTableCommentEvent with column comment updates |
| MaxComputeMetadataApplier.java | Implemented table comment alteration support |
| OceanBaseMySQLCatalog.java | Added alterTable method for table comments |
| OceanBaseOracleCatalog.java | Added stub method throwing unsupported exception |
| DorisMetadataApplier.java | Added table comment handler |
| DorisSchemaChangeManager.java | Implemented alterTableComment method |
| StarRocksMetadataApplier.java | Added TODO comment for future implementation |
| IcebergMetadataApplier.java | Throws UnsupportedSchemaChangeEventException |
| Multiple test files | Updated expected event strings to include comments field |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/event/AlterTableCommentEvent.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/apache/flink/cdc/connectors/oceanbase/catalog/OceanBaseMySQLCatalog.java
Outdated
Show resolved
Hide resolved
...doris/src/main/java/org/apache/flink/cdc/connectors/doris/sink/DorisSchemaChangeManager.java
Outdated
Show resolved
Hide resolved
...ute/src/main/java/org/apache/flink/cdc/connectors/maxcompute/utils/SchemaEvolutionUtils.java
Show resolved
Hide resolved
...ute/src/main/java/org/apache/flink/cdc/connectors/maxcompute/utils/SchemaEvolutionUtils.java
Show resolved
Hide resolved
...e/src/main/java/org/apache/flink/cdc/connectors/oceanbase/catalog/OceanBaseMySQLCatalog.java
Show resolved
Hide resolved
...java/org/apache/flink/cdc/connectors/mysql/source/parser/CustomAlterTableParserListener.java
Outdated
Show resolved
Hide resolved
|
Rebased master and addressed the comments of copilot. |
https://issues.apache.org/jira/browse/FLINK-37203