Skip to content

[FLINK-37203] Alter table comment or column comment#3893

Open
ChaomingZhangCN wants to merge 5 commits intoapache:masterfrom
ChaomingZhangCN:FLINK-37203
Open

[FLINK-37203] Alter table comment or column comment#3893
ChaomingZhangCN wants to merge 5 commits intoapache:masterfrom
ChaomingZhangCN:FLINK-37203

Conversation

@ChaomingZhangCN
Copy link
Contributor

@ChaomingZhangCN
Copy link
Contributor Author

@lvyanquan @leonardBang PTAL.

@ChaomingZhangCN
Copy link
Contributor Author

@yuxiqian Can you help review?

@lvyanquan lvyanquan self-assigned this May 27, 2025
@github-actions
Copy link

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.

@lvyanquan
Copy link
Contributor

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.

@leonardBang leonardBang reopened this Dec 3, 2025
@ChaomingZhangCN
Copy link
Contributor Author

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AlterTableCommentEvent class and associated serialization, visitor, and type infrastructure
  • Extended AlterColumnTypeEvent to include a comments map 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.

@lvyanquan
Copy link
Contributor

Rebased master and addressed the comments of copilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants