Skip to content

[FLINK-39346] Improve the error message when the AddColumnEvent fails#4353

Open
sd4324530 wants to merge 2 commits intoapache:masterfrom
sd4324530:FLINK-39346
Open

[FLINK-39346] Improve the error message when the AddColumnEvent fails#4353
sd4324530 wants to merge 2 commits intoapache:masterfrom
sd4324530:FLINK-39346

Conversation

@sd4324530
Copy link
Copy Markdown
Contributor

Adding error event information to the error message can help resolve the problem more quickly.

Signed-off-by: Pei Yu <125331682@qq.com>
Copy link
Copy Markdown
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

Improves diagnostics around SchemaUtils.applyAddColumnEvent failures by enriching IllegalArgumentException messages with event/table context, making it easier to debug AddColumnEvent insertion errors.

Changes:

  • Expand IllegalArgumentException messages for AddColumnEvent BEFORE/AFTER insertion failures to include table id and referenced column name.
  • Add unit tests asserting the improved error messages for invalid BEFORE/AFTER references.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/utils/SchemaUtils.java Improves error messages thrown when AddColumnEvent references a non-existent column in BEFORE/AFTER positions.
flink-cdc-common/src/test/java/org/apache/flink/cdc/common/utils/SchemaUtilsTest.java Adds assertions to validate the improved AddColumnEvent failure messages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Pei Yu <125331682@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants