fxbing opened a new pull request, #4621:
URL: https://github.com/apache/flink-cdc/pull/4621

   ## What is the purpose of this pull request?
   
   Fixes [FLINK-41387](https://issues.apache.org/jira/browse/FLINK-41387).
   
   When the target schema evolves before the source, the Fluss sink can submit 
an ADD COLUMN request for columns that already exist. This change checks the 
target schema before the first `alterTable` call.
   
   ## Brief change log
   
   - Submit only missing columns. Skip `alterTable` when every requested column 
already exists with the matching Fluss type.
   - Reject duplicate names within the event and conflicting target types 
during the check.
   - Use the existing reconciliation logic if a stale schema read or a 
concurrent addition causes Fluss to reject the ADD.
   
   ## Verifying this change
   
   - Added a parameterized test that records `alterTable` calls against a Fluss 
test cluster with none, some, or all of the requested columns already present. 
The partial and full-match cases both caught redundant requests before the fix.
   - All 49 targeted tests passed on both Java 11 / Flink 1.20.3 and Java 17 / 
Flink 2.2.0, including tests that write and read back records from primary-key 
and log tables after column addition.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? No.
   - If yes, how is the feature documented? Not applicable.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenAI Codex.
   
   Generated-by: OpenAI Codex 0.166.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to