Skip to content

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

Merged
yuxiqian merged 2 commits into
apache:masterfrom
sd4324530:FLINK-39346
Mar 30, 2026
Merged

[FLINK-39346] Improve the error message when the AddColumnEvent fails#4353
yuxiqian merged 2 commits into
apache: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.

Comment thread flink-cdc-common/src/main/java/org/apache/flink/cdc/common/utils/SchemaUtils.java Outdated
Comment thread flink-cdc-common/src/main/java/org/apache/flink/cdc/common/utils/SchemaUtils.java Outdated
Signed-off-by: Pei Yu <125331682@qq.com>
Copy link
Copy Markdown
Member

@yuxiqian yuxiqian left a comment

Choose a reason for hiding this comment

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

+1

@yuxiqian yuxiqian merged commit 68ee0c9 into apache:master Mar 30, 2026
18 of 19 checks passed
@sd4324530 sd4324530 deleted the FLINK-39346 branch March 30, 2026 01:41
ThorneANN pushed a commit to ThorneANN/flink-cdc that referenced this pull request Mar 31, 2026
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.

3 participants