-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34628][SQL] Remove GlobalLimit operator if its child max rows not larger than limit number #31750
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
Conversation
|
Test build #135787 has finished for PR 31750 at commit
|
|
cc @cloud-fan This is a part of #31691. To make that pr more clear. |
| * This rule optimizes Limit operators by: | ||
| * 1. Eliminate [[Limit]] operators if it's child max row <= limit. | ||
| * 2. Combines two adjacent [[Limit]] operators into one, merging the | ||
| * 2. Eliminate [[GlobalLimit]] operators if it's child max row <= limit. |
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.
nit: how about merging 1. and 2. like Eliminate [[Limit]]/[[GlobalLimit]] ...?
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.
fixed.
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
dongjoon-hyun
left a comment
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.
|
Test build #135830 has finished for PR 31750 at commit
|
|
late LGTM |
… if its child max rows not larger than limit number (#1033) * [SPARK-34628][SQL] Remove GlobalLimit operator if its child max rows not larger than limit number ### What changes were proposed in this pull request? This pr remove `GlobalLimit` operator if its child max rows not larger than limit number. For example: ``` val testRelation = LocalRelation.fromExternalRows(Seq("a".attr.int, "b".attr.int, "c".attr.int), 1.to(10).map(_ => Row(1, 2, 3)) ) val query = GlobalLimit(100, testRelation) ``` We can remove this `GlobalLimit`. ### Why are the changes needed? Further optimize the query. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Unit test. Closes #31750 from wangyum/SPARK-34628. Authored-by: Yuming Wang <yumwang@ebay.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
This pr remove
GlobalLimitoperator if its child max rows not larger than limit number. For example:We can remove this
GlobalLimit.Why are the changes needed?
Further optimize the query.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit test.