JingsongLi opened a new pull request, #1182:
URL: https://github.com/apache/paimon-rust/pull/1182

   ## What changes
   
   Align existing write/update APIs with current Java when the table carries a 
historical or captured read view.
   
   - Treat scan selectors as read configuration. Ordinary writes retain the 
resolved schema and field IDs; commit, overwrite and truncate operate on the 
latest state of the selected table and branch.
   - Support historical key-based upsert and MERGE with INSERT clauses through 
the ordinary writer. Matched updates keep their read-snapshot conflict 
baseline; new rows receive fresh row IDs at publication.
   - Restore cross-partition primary-key locations from a pinned latest 
snapshot, preserving the writer's schema. Reading the historical view 
previously let a write create duplicate primary keys in different partitions.
   - Preserve REST publication identity, authorization binding and schema 
validation. Row mutations still require an unrestricted target grant; ordinary 
INSERT does not require a SELECT grant.
   - Keep captured readers fixed, including empty views, after writes publish. 
No new public API or dependency.
   
   ## Java references
   
   - `BatchWriteBuilderImpl.newWrite/newCommit` and 
`AppendOnlyFileStoreTable.newWrite` retain the table's resolved schema.
   - `FileSystemWriteRestore.restoreFiles` restores from the latest snapshot 
unless an explicit restore snapshot is supplied.
   - `FileStoreCommitImpl` resolves the latest snapshot and schema for 
publication, overwrite and truncate.
   - Spark 
`MergeIntoPaimonDataEvolutionTable.withMatchedUpdateScanOptions/insertActionInvoke`
 matches the selected snapshot and writes INSERT rows using the same table 
schema.
   - `IndexBootstrap` forces the latest scan for cross-partition writer 
recovery.
   
   ## Verification
   
   - Regression tests reproduced the historical-writer rejection and 
cross-partition duplicate-key failure before the fixes.
   - Historical write/update, cross-partition write, predicate delete and table 
update integrations: **68 passed**.
   - REST MERGE source/authorization integrations: **8 passed**, including 32 
historical INSERT grant/view/action combinations and ordinary historical INSERT 
authorization checks.
   - Time-travel and branch unit groups: **37 passed**.
   - Rust 1.98.0 Core/Python binding all-target Clippy with `-D warnings`, fmt 
and diff checks.
   
   Companion Python PR will keep its Native CI on Rust main and stay draft 
until this dependency merges. No Native Python extension was rebuilt or 
installed locally.
   


-- 
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