-
Notifications
You must be signed in to change notification settings - Fork 436
[Flink] Support Partial Updates to the Flink Sink #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| String col = specifiedColumns.get(i); | ||
| int idx = allFieldNames.indexOf(col); | ||
| checkArgument( | ||
| idx >= 0, "Column '%s' not found in table schema: %s", col, allFieldNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Slightly more context can be provided in the message e.g. "Partial update column '%s' not found in table schema: %s'
There was a problem hiding this 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 PR adds support for partial updates in the Flink Sink, allowing users to update only specific columns in upsert operations while preserving other column values. The implementation ensures that primary key columns are always included in partial update specifications.
Key Changes:
- Added
setPartialUpdateColumnsAPI toFlussSinkBuilderfor specifying which columns to update - Implemented validation logic to ensure partial updates include all primary key columns
- Added comprehensive integration tests covering multiple partial update scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| FlussSinkBuilder.java | Adds partial update column configuration API and validation logic to compute target column indexes |
| FlussSinkBuilderTest.java | Adds unit tests for the new computeTargetColumnIndexes method covering valid and invalid scenarios |
| FlussSinkITCase.java | Adds three integration tests demonstrating partial updates with different writer configurations and data types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.