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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   This PR fixes two FE issues:
   
   1. TopN lazy materialization can fail on OLAP tables created with 
`light_schema_change=false`.
      TopN lazy materialization depends on BE rebuilding the tablet schema from 
`columns_desc` so that `GLOBAL_ROWID_COL` is available for row-id fetch. For 
tables whose columns have `col_unique_id=-1`, BE skips that rebuild path, so 
the row-id column is not added and the scan can fail with `field name is 
invalid`. This PR skips TopN lazy materialization for tables with 
`light_schema_change=false`.
   
   2. Some computed DML statements did not generate query/load profiles.
      `UPDATE`, `MERGE INTO`, and `DELETE FROM ... USING` execute through the 
compute path, but they were still treated as profile-unsafe statements. This PR 
marks these commands as profile-safe while keeping regular `DELETE FROM` 
unchanged because it should not produce a compute profile.
   
   ### Release note
   
   Support profiles for `UPDATE`, `MERGE INTO`, and `DELETE FROM ... USING` 
statements, and avoid TopN lazy materialization on OLAP tables with 
`light_schema_change=false`.
   
   ### Check List (For Author)
   
   - Test: Regression test / Unit Test / Build
       - `./build.sh --fe`
       - `./run-fe-ut.sh --run 
org.apache.doris.nereids.postprocess.TopnLazyMaterializeTest`
       - `./run-regression-test.sh --run --conf 
/tmp/doris-regression-conf-run-path.groovy -d query_profile -s dml_profile_safe`
   - Behavior changed: Yes
       - Tables with `light_schema_change=false` no longer use TopN lazy 
materialization.
       - `UPDATE`, `MERGE INTO`, and `DELETE FROM ... USING` now generate 
profiles when profiling is enabled.
   - Does this need documentation: No
   
   ### 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