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

   ### Purpose
   
   Accept Arrow MAP input for existing ARRAY<ROW<key, value>> columns in 
row-level updates. PyPaimon already accepts this through its Arrow input 
conversion, but Native execution currently fails with `Unsupported update 
cast`. This blocks the same supported input in row-ID, incremental, predicate, 
upsert and MERGE updates.
   
   This adapts external Arrow input to the declared target column; it does not 
add a MAP-to-ARRAY schema evolution or Java logical CAST rule. The persisted 
ARRAY/ROW schema and Parquet encoding remain unchanged.
   
   ### Brief change log
   
   - Adapt MAP entries to two-field ARRAY/ROW elements by key/value position, 
including renamed Arrow fields.
   - Reuse recursive child conversions and whole-column row-ID constructor 
fallback, preserving precision checks and NULL visibility.
   - Extract the existing MAP child conversion into `cast_map_entries`, shared 
with MAP-to-MAP input handling.
   - Handle nested ROW/ARRAY/MAP containers, slices, dictionary encodings, NULL 
and empty containers. Validate target field count and actual child nullability.
   - Add no public API, dependency, configuration or storage format change.
   
   ### Tests
   
   Baseline reproduced: the new integer/root/row-ID/batch integration case 
passes with Python execution and fails on the old Native extension with 
`Unsupported update cast`.
   
   - `cargo +1.98.0 test --locked -p paimon --lib table::update_input`: 33 
passed.
   - `cargo +1.98.0 test --locked -p paimon --lib table_merge_into_tests`: 17 
passed.
   - `cargo +1.98.0 test --locked -p paimon --lib upsert`: 10 passed.
   - Clippy with Rust 1.98.0 and `-D warnings`, formatting and `git diff 
--check` passed.
   - All 210 new Python reference cases passed before rebuilding the extension.
   - Built the Native extension from this branch before running Python tests. 
New container cases plus existing nested update, selected-value upsert, Blob 
update and MERGE regressions: **967 passed, 2 skipped**, with Native 
plan/read/write/commit enabled. Counters: 1551 plans, 1855 reads, 600 writes, 
147 commits.
   
   The Python matrix exercises batch/stream row-ID updates, incremental 
updates, predicate array and callable assignments, matched upserts and MERGE. 
It verifies read parity, stable row IDs, untouched fields and unchanged 
committed data on child conversion errors. Core tests also cover hidden invalid 
children under NULL parents, whole-column fallback, dictionary values, field 
arity and nullability.
   
   ### API and documentation
   
   Internal input conversion only; no new public interface or user 
configuration. Documented positional MAP entry conversion at the shared helper.
   


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