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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: #64884
   
   Problem Summary:
   
   This PR backports #64884 to branch-4.0.
   
   For DELETE on unique merge-on-write tables with generated columns and
   `enable_mow_light_delete=false`, Doris rewrites DELETE into a partial update.
   Before the fix, `BindSink` still treated generated columns as target columns 
to
   bind and recompute. If the generated-column expression referenced ordinary
   columns that were not part of the DELETE partial-update output, analysis 
could
   fail before the DELETE was planned.
   
   This change detects the DELETE partial-update path in `BindSink`, avoids
   auto-adding omitted generated columns for that path, and keeps existing
   generated-column handling for normal INSERT/UPDATE partial updates.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
       - [x] Unit Test
       - [x] 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 <!-- Add your reason?  -->
   
   Regression test:
   
   ```
   ./run-regression-test.sh --run -d 
regression-test/suites/ddl_p0/test_create_table_generated_column -s 
test_generated_column_delete
   ./run-regression-test.sh --run -d 
regression-test/suites/ddl_p0/test_create_table_generated_column -s 
test_partial_update_generated_column
   ```
   
   Unit test:
   
   ```
   ./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.plans.DeleteFromUsingCommandTest
   ```
   
   Manual test:
   
   ```
   git diff --check HEAD~1 HEAD
   ./build.sh --fe -j100
   ./build.sh --be -j100
   ```
   
   The local regression cluster was restarted after rebuilding BE. FE and BE 
both
   reported version `doris-4.0.6-rc02-a9d12207ae5` before running regression.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. DELETE partial updates on unique MOW tables no longer try to 
recompute omitted generated columns.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   


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