[fix](Nereids) set operation children output order not same#24060
Conversation
eddfc24 to
6391338
Compare
|
run buildall |
6391338 to
0140037
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
0140037 to
79792f1
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
79792f1 to
86986b6
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
86986b6 to
25a6aaa
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
25a6aaa to
4085599
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
4085599 to
03df48d
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order is wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
03df48d to
16fc6ac
Compare
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…4060) we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order is wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
…4060) we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order is wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
…4060) we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order is wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
…24383) we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order is wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
…#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.
…#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.
…#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.
we generate project for all set operation's children to ensure the order of all children are not changed. However, some rules, such as PushDownProjectThroughLimit could remove these projects involuntarily. When it happen, the column order maybe wrong and lead to BE core dump. This PR use a new variable in SetOperation to save the output order of children of set operation. Then the children's output order could be changed and never affect to SetOperation at all.
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...