jackylee-ch commented on PR #984:
URL: https://github.com/apache/paimon-rust/pull/984#issuecomment-5944076306

   Addressed.
   
   The positional value-count check moved from `insert_select_clause` (which 
only runs while building unmatched-row batches) into 
`validate_merge_insert_columns`, the upfront validation that both 
`execute_merge_into` (CoW) and `execute_merge_into_once` (data evolution) call 
before any batch is built. So a column-less `INSERT VALUES (...)` whose value 
count does not match the table is rejected regardless of whether any row is 
unmatched. `INSERT *` / `INSERT ROW` (no columns and no values) is left 
untouched.
   
   Regression `test_cow_merge_insert_arity_validated_even_when_all_matched`: 
with a source row that matches on `id`, `WHEN MATCHED THEN UPDATE SET value = 
s.value WHEN NOT MATCHED THEN INSERT VALUES (s.id, s.name)` against a 
three-column target now fails, and the target is unchanged — the matched UPDATE 
is not applied. I verified non-vacuity: disabling the upfront check makes the 
all-matched merge commit the UPDATE and the test fail; restoring it passes.
   
   Rebased onto current main. The `merge_into` module tests (16) pass; `clippy 
-p paimon-datafusion --all-targets --features fulltext,vortex -D warnings` is 
clean.
   


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