-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(optimizer): reduce expr tree depth when merge logical operations #17342
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c148f06
fix(optimizer): reduce expr tree depth when merge logical operations
BugenZhao 30032c7
refactor api
BugenZhao b2ea565
apply to more
BugenZhao 2bbe2c9
try leveled
BugenZhao e042798
add e2e test for customer case
BugenZhao 447d3c0
apply to null safe eq
BugenZhao ce8d29e
Update stack_overflow_17342.slt
BugenZhao 7f293c4
skip in madsim
BugenZhao 782975f
Update src/frontend/src/expr/utils.rs
BugenZhao b51a40c
bump sqllogictest
BugenZhao 14b2f9c
use released version sqllogictest
BugenZhao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link #17347
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean why it doesn't work in madsim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
risingwave/src/common/src/util/recursive.rs
Lines 98 to 102 in 14b2f9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some assertion failed. Possibly due to libc overridden. Haven't dived into it since it's not a big deal.