JingsongLi commented on PR #984:
URL: https://github.com/apache/paimon-rust/pull/984#issuecomment-5934530217

   Requirement fit: **SUPPORTED** — retaining positional MERGE INSERT values 
fixes a real data-correctness issue. Implementation: **FINDINGS** at `bdde90be`.
   
   **[P2] Validate positional INSERT arity before executing MERGE** 
(`crates/integrations/datafusion/src/merge_into.rs:1012-1018`). The added 
value-count check runs only while building unmatched-row batches. CoW skips 
that step when all source rows match, and data evolution returns through the 
empty-batch guard; the upfront `validate_merge_insert_columns` validates names 
only. The new promise to reject positional value-count mismatches therefore 
depends on the current data.
   
   I reproduced this through SQL in both modes with a three-column `(id, name, 
value)` target: `WHEN MATCHED THEN UPDATE SET value=s.value WHEN NOT MATCHED 
THEN INSERT VALUES (s.id, s.name)` succeeds when the source row matches, and 
changes the target value from 10 to 99. Please move the arity check into the 
existing upfront validation used by both modes, preserving `INSERT ROW/*`, and 
add a regression that an invalid fully matched MERGE fails without changing the 
target. This all-matched behavior predates the PR; the finding is an incomplete 
part of the explicitly stated validation requirement, rather than a newly 
introduced mutation regression.
   
   Verification: 15/15 MERGE module tests and 29/29 MERGE SQL integration tests 
passed. The temporary invalid-arity SQL regression failed in both CoW and 
data-evolution mode with a successful commit. Diff check and current-main 
merge-tree passed; all 14 head CI checks are green. Temporary edits were 
restored.
   


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