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

   ### Purpose
   
   Fixes #9800
   
   When a composite primary key is declared in a different order from the table 
columns, PyPaimon can return both the old and updated row. For example, four 
orders with `PRIMARY KEY (order_id, customer_id)` produce five rows after one 
update when `customer_id` precedes `order_id` in the table schema.
   
   Build merge-read key fields from the table's ordered trimmed primary-key 
fields, matching the writer's sort order. This preserves field IDs, types and 
the storage format. Regression coverage checks complete merged results, 
value-only projections, partition-key trimming and a primary-key column 
position change across schema versions.
   
   ### Tests
   
   Validation: the new regression tests fail before the fix; all 70 tests in 
`reader_primary_key_test`, `schema_evolution_pk_read_test`, 
`projection_predicate_index_test` and `test_sequence_field_read` pass after it. 
Flake8 on changed files and `git diff --check` pass. Local validation used 
Python 3.12.6 and PyArrow 19.0.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: [email protected]

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

Reply via email to