bobhan1 opened a new pull request, #67667:
URL: https://github.com/apache/doris/pull/67667

   ### What problem does this PR solve?
   
   Partial updates through `INSERT INTO ... VALUES` in an explicit transaction 
can silently overwrite omitted columns with NULL and interpret later statements 
using the first statement's column mapping. For example, updating `(k, v1)` 
followed by `(k, v2)` can write the second statement's value into `v1`.
   
   Reject actual partial updates in `BatchInsertIntoTableCommand` before 
changing transaction state or initializing/appending to the load, and remove 
the now-unreachable partial-column mapping. Full-row VALUES inserts remain 
supported even when the partial-update session variable is enabled. Autocommit 
and transactional INSERT SELECT retain their existing behavior. Earlier 
successful statements remain committable or rollbackable after a rejected 
statement.
   
   ### Release note
   
   Partial updates using INSERT INTO VALUES in explicit transactions now fail 
with a clear error instead of potentially writing incorrect data.
   
   ### Check List (For Author)
   
   - Test
     - [x] Regression test added: `test_txn_values_partial_update` covers 
rejection before/after a full-row insert, commit/rollback after rejection, 
full-row inserts with the session flag enabled, autocommit partial updates, and 
transactional INSERT SELECT partial updates.
     - Validation: `./build.sh --fe -j100` and `./build.sh --be -j100` passed, 
including FE Checkstyle. The new suite passed locally on 1 FE + 1 BE after 
framework-generated output was inspected and the suite was rerun normally (1 
suite, 0 failures). `git diff --check` passed. Cloud regression and FE/BE unit 
tests were not run.
   - Behavior changed:
     - [x] Yes. Unsupported transactional VALUES partial updates are rejected 
before writing.
   - Does this need documentation?
     - [x] Yes. The transaction and INSERT documentation should state this 
limitation; documentation is not changed in this PR.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to