-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(optimizer): reduce expr tree depth when merge logical operations (#…
…17342) Signed-off-by: Bugen Zhao <[email protected]> Co-authored-by: Dylan <[email protected]> Co-authored-by: xxchan <[email protected]>
- Loading branch information
1 parent
4a25f01
commit 8a4bd3f
Showing
17 changed files
with
205 additions
and
98 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
statement ok | ||
SET streaming_parallelism TO 1; | ||
|
||
statement ok | ||
CREATE TABLE t (v int); | ||
|
||
# This query used to overflow the stack during optimization as it generated a left-deep tree | ||
# of `OR xx IS NOT NULL` expression in the filter after each full outer join. | ||
skipif madsim | ||
statement ok | ||
CREATE MATERIALIZED VIEW mv AS | ||
SELECT | ||
count(*) | ||
FROM | ||
t | ||
FULL OUTER JOIN t t1 USING (v) | ||
FULL OUTER JOIN t t2 USING (v) | ||
FULL OUTER JOIN t t3 USING (v) | ||
FULL OUTER JOIN t t4 USING (v) | ||
FULL OUTER JOIN t t5 USING (v) | ||
FULL OUTER JOIN t t6 USING (v) | ||
FULL OUTER JOIN t t7 USING (v) | ||
FULL OUTER JOIN t t8 USING (v) | ||
FULL OUTER JOIN t t9 USING (v) | ||
FULL OUTER JOIN t t10 USING (v) | ||
FULL OUTER JOIN t t11 USING (v) | ||
FULL OUTER JOIN t t12 USING (v) | ||
FULL OUTER JOIN t t13 USING (v) | ||
FULL OUTER JOIN t t14 USING (v) | ||
FULL OUTER JOIN t t15 USING (v) | ||
FULL OUTER JOIN t t16 USING (v) | ||
FULL OUTER JOIN t t17 USING (v) | ||
FULL OUTER JOIN t t18 USING (v) | ||
FULL OUTER JOIN t t19 USING (v) | ||
FULL OUTER JOIN t t20 USING (v) | ||
FULL OUTER JOIN t t21 USING (v) | ||
FULL OUTER JOIN t t22 USING (v) | ||
FULL OUTER JOIN t t23 USING (v) | ||
FULL OUTER JOIN t t24 USING (v) | ||
FULL OUTER JOIN t t25 USING (v) | ||
FULL OUTER JOIN t t26 USING (v) | ||
FULL OUTER JOIN t t27 USING (v) | ||
FULL OUTER JOIN t t28 USING (v) | ||
FULL OUTER JOIN t t29 USING (v) | ||
FULL OUTER JOIN t t30 USING (v) | ||
FULL OUTER JOIN t t31 USING (v) | ||
FULL OUTER JOIN t t32 USING (v) | ||
FULL OUTER JOIN t t33 USING (v) | ||
FULL OUTER JOIN t t34 USING (v) | ||
FULL OUTER JOIN t t35 USING (v) | ||
FULL OUTER JOIN t t36 USING (v) | ||
FULL OUTER JOIN t t37 USING (v) | ||
FULL OUTER JOIN t t38 USING (v) | ||
FULL OUTER JOIN t t39 USING (v) | ||
FULL OUTER JOIN t t40 USING (v) | ||
FULL OUTER JOIN t t41 USING (v) | ||
FULL OUTER JOIN t t42 USING (v) | ||
FULL OUTER JOIN t t43 USING (v) | ||
FULL OUTER JOIN t t44 USING (v) | ||
FULL OUTER JOIN t t45 USING (v) | ||
FULL OUTER JOIN t t46 USING (v) | ||
FULL OUTER JOIN t t47 USING (v) | ||
FULL OUTER JOIN t t48 USING (v) | ||
FULL OUTER JOIN t t49 USING (v) | ||
FULL OUTER JOIN t t50 USING (v) | ||
FULL OUTER JOIN t t51 USING (v) | ||
FULL OUTER JOIN t t52 USING (v) | ||
FULL OUTER JOIN t t53 USING (v) | ||
FULL OUTER JOIN t t54 USING (v) | ||
FULL OUTER JOIN t t55 USING (v) | ||
FULL OUTER JOIN t t56 USING (v) | ||
FULL OUTER JOIN t t57 USING (v) | ||
FULL OUTER JOIN t t58 USING (v) | ||
FULL OUTER JOIN t t59 USING (v) | ||
FULL OUTER JOIN t t60 USING (v) | ||
FULL OUTER JOIN t t61 USING (v) | ||
FULL OUTER JOIN t t62 USING (v) | ||
FULL OUTER JOIN t t63 USING (v) | ||
FULL OUTER JOIN t t64 USING (v) | ||
FULL OUTER JOIN t t65 USING (v) | ||
FULL OUTER JOIN t t66 USING (v) | ||
FULL OUTER JOIN t t67 USING (v) | ||
FULL OUTER JOIN t t68 USING (v) | ||
FULL OUTER JOIN t t69 USING (v) | ||
FULL OUTER JOIN t t70 USING (v) | ||
FULL OUTER JOIN t t71 USING (v) | ||
FULL OUTER JOIN t t72 USING (v) | ||
FULL OUTER JOIN t t73 USING (v) | ||
FULL OUTER JOIN t t74 USING (v) | ||
FULL OUTER JOIN t t75 USING (v) | ||
FULL OUTER JOIN t t76 USING (v) | ||
FULL OUTER JOIN t t77 USING (v) | ||
FULL OUTER JOIN t t78 USING (v) | ||
FULL OUTER JOIN t t79 USING (v) | ||
FULL OUTER JOIN t t80 USING (v) | ||
FULL OUTER JOIN t t81 USING (v) | ||
FULL OUTER JOIN t t82 USING (v) | ||
FULL OUTER JOIN t t83 USING (v) | ||
FULL OUTER JOIN t t84 USING (v) | ||
FULL OUTER JOIN t t85 USING (v) | ||
FULL OUTER JOIN t t86 USING (v) | ||
FULL OUTER JOIN t t87 USING (v) | ||
FULL OUTER JOIN t t88 USING (v) | ||
FULL OUTER JOIN t t89 USING (v) | ||
FULL OUTER JOIN t t90 USING (v) | ||
FULL OUTER JOIN t t91 USING (v) | ||
FULL OUTER JOIN t t92 USING (v) | ||
FULL OUTER JOIN t t93 USING (v) | ||
FULL OUTER JOIN t t94 USING (v) | ||
FULL OUTER JOIN t t95 USING (v) | ||
FULL OUTER JOIN t t96 USING (v) | ||
FULL OUTER JOIN t t97 USING (v) | ||
FULL OUTER JOIN t t98 USING (v) | ||
; | ||
|
||
statement ok | ||
DROP TABLE t CASCADE; | ||
|
||
statement ok | ||
SET streaming_parallelism TO DEFAULT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.