-
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): fix lateral subquery with cte #19162
Conversation
└─BatchHashJoin { type: Inner, predicate: t1.y IS NOT DISTINCT FROM t2.y AND t1.x = t2.x, output: [t1.x, t1.y] } | ||
├─BatchExchange { order: [], dist: HashShard(t1.y) } | ||
│ └─BatchScan { table: t1, columns: [t1.x, t1.y], distribution: SomeShard } | ||
└─BatchGroupTopN { order: [t2.y ASC], limit: 1, offset: 0, group_key: [t2.y] } |
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.
🤔 Could it be the Agg operator? Maybe we should generate LogicalDedup
instead of LogicalTopN
in ApplyLimitTransposeRule
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.
Yes, I think we can. Let's open an issue and create another PR to optimize it.
Oh. It only works for limit 1, but not general.
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.
LGTM
Co-authored-by: Dylan <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Share
Relation in the binder and it should be visited when transforming the CorrelatedInputRef.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.