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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary: UPDATE statements on merge-on-write unique tables can be 
planned as partial updates when only a small number of columns are assigned. 
The partial-update projection previously included only key and assigned 
columns, while BindSink recomputes generated columns and requires their 
ordinary source columns. Updating an unrelated column therefore failed during 
analysis when a generated column dependency was omitted. This change includes 
ordinary columns referenced by generated columns in the UPDATE partial-update 
projection so BindSink can materialize generated values and the update succeeds.
   
   ### Release note
   
   Fix UPDATE failures on merge-on-write unique tables with generated columns 
when updating unrelated columns.
   
   ### Check List (For Author)
   
   - Test
       - [x] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason
   
       Commands run:
   
       - `./build.sh --fe -j100`
       - `./build.sh --be -j100`
       - `./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.plans.UpdateCommandTest`
       - `./run-regression-test.sh --run -d 
ddl_p0/test_create_table_generated_column -s 
test_update_generated_column_dependency`
       - `./run-regression-test.sh --run -d 
ddl_p0/test_create_table_generated_column -s 
test_partial_update_generated_column`
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. UPDATE partial projections now include ordinary columns 
referenced by generated columns.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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