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

   ### What problem does this PR solve?
   
   Related PR: #24060, #27628
   
   Problem Summary: Some Nereids rewrite rules mapped set operation outputs to 
child outputs by list index. Set operations can carry regulator child outputs 
whose order and cardinality differ from the child plan output, so those rules 
could read past the child output or rewrite expressions with the wrong child 
slot. This change makes one-row union merge and distinct TopN/Limit pushdown 
build child mappings from regular child outputs instead.
   
   ### Release note
   
   Fix planner failures or incorrect set operation rewrites when regulated 
child outputs differ from child plan outputs.
   
   ### Check List (For Author)
   
   - Test: Regression test / Unit Test
       - ./run-fe-ut.sh --run 
org.apache.doris.nereids.rules.rewrite.SetOperationOutputMappingTest
       - cd fe && mvn checkstyle:check -pl fe-core
       - ./run-regression-test.sh --run -d nereids_rules_p0/push_down_top_n -s 
push_down_top_n_distinct_through_union
       - ./run-regression-test.sh --run -d 
nereids_rules_p0/push_down_limit_distinct -s 
push_down_limit_distinct_through_union
       - ./run-regression-test.sh --run -d 
nereids_rules_p0/merge_one_row_relation -s merge_one_row_relation_into_union
   - Behavior changed: Yes (fixes set operation rewrites to use regular child 
outputs)
   - Does this need documentation: No


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