You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "prashant8530 (via GitHub)" <gi...@apache.org> on 2025/11/28 18:36:04 UTC

[PR] [flink-cdc] Fix partition key conflicts and support append-only parti… [paimon]

prashant8530 opened a new pull request, #6706:
URL: https://github.com/apache/paimon/pull/6706

                                                                                                                                                                                                                          ### Purpose                                                                                                                                                                                                               
                                                                                                                                                                                                                             
   Linked issue: close #XXXX (add your issue number)                                                                                                                                                                         
                                                                                                                                                                                                                             
   Fix `PaimonMetadataApplier` to support append-only partitioned tables and prevent validation failures when partition key equals primary key.                                                                              
                                                                                                                                                                                                                             
   **Problem:**                                                                                                                                                                                                              
   `PaimonMetadataApplier.applyCreateTable()` unconditionally adds partition keys to primary keys, causing:                                                                                                                  
   1. Append-only tables (no primary key) cannot have partitions                                                                                                                                                             
   2. When `partitionKeys = primaryKeys`, validation fails with: "Primary key constraint should not be same with partition fields"                                                                                           
                                                                                                                                                                                                                             
   **Solution:**                                                                                                                                                                                                             
   Only add partition keys to primary keys when safe (non-empty PK and no conflict). This preserves existing behavior for composite keys while enabling append-only and partition-by-PK scenarios.                           
                                                                                                                                                                                                                             
   ### Tests                                                                                                                                                                                                                 
                                                                                                                                                                                                                             
   Existing tests validate the fix doesn't break current behavior. The change makes behavior less restrictive by allowing previously invalid schemas.                                                                        
                                                                                                                                                                                                                             
   ### API and Format                                                                                                                                                                                                        
                                                                                                                                                                                                                             
   No API or storage format changes. This is a bug fix in schema creation logic.                                                                                                                                             
                                                                                                                                                                                                                             
   ### Documentation                                                                                                                                                                                                         
                                                                                                                                                                                                                             
   No new feature introduced. This fixes existing functionality to work as expected.  
   
   Issue: https://github.com/apache/paimon/issues/6705


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [flink-cdc] Fix partition key conflicts and support append-only parti… [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #6706:
URL: https://github.com/apache/paimon/pull/6706#issuecomment-4527200422

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [flink-cdc] Fix partition key conflicts and support append-only parti… [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #6706:
URL: https://github.com/apache/paimon/pull/6706


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [flink-cdc] Fix partition key conflicts and support append-only parti… [paimon]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6706:
URL: https://github.com/apache/paimon/pull/6706#issuecomment-4402159718

   This pull request has had no activity for 90 days. If you'd like to keep it open, please push a new commit or leave a comment. Thanks for the contribution.


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org