Uh oh!
There was an error while loading. Please reload this page.
[SPARK-19658] [SQL] Set NumPartitions of RepartitionByExpression In Parser - #16988
Closed
gatorsmile wants to merge 9 commits into
Closed
[SPARK-19658] [SQL] Set NumPartitions of RepartitionByExpression In Parser#16988gatorsmile wants to merge 9 commits into
gatorsmile wants to merge 9 commits into
Conversation
SparkQA
commented
Feb 19, 2017
Test build #73125 has finished for PR 16988 at commit
|
SparkQA
commented
Feb 19, 2017
Test build #73130 has finished for PR 16988 at commit
|
MemberAuthor
cloud-fan
commented
Feb 22, 2017
Contributor
how about we set the |
gatorsmile
commented
Feb 22, 2017
| (" sort by a, b desc", basePlan.sortBy('a.asc, 'b.desc)), | ||
| (" distribute by a, b", basePlan.distribute('a, 'b)()), | ||
| (" distribute by a sort by b", basePlan.distribute('a)().sortBy('b.asc)), | ||
| (" cluster by a, b", basePlan.distribute('a, 'b)().sortBy('a.asc, 'b.asc)) |
MemberAuthor
There was a problem hiding this comment.
These three test cases are moved to SparkSqlParserSuite.scala
gatorsmile
commented
Feb 22, 2017
MemberAuthor
@cloud-fan Great idea! |
SparkQA
commented
Feb 22, 2017
Test build #73286 has finished for PR 16988 at commit
|
SparkQA
commented
Feb 22, 2017
Test build #73288 has finished for PR 16988 at commit
|
| ctx: QueryOrganizationContext, | ||
| expressions: Seq[Expression], | ||
| query: LogicalPlan): LogicalPlan = { | ||
| RepartitionByExpression(expressions, query, conf.numShufflePartitions) |
SparkQA
commented
Feb 22, 2017
Test build #73289 has finished for PR 16988 at commit
|
cloud-fan
commented
Feb 22, 2017
Contributor
LGTM |
SparkQA
commented
Feb 22, 2017
Test build #73293 has finished for PR 16988 at commit
|
cloud-fan
commented
Feb 23, 2017
Contributor
thanks, merging to master! |
Yunni pushed a commit
to Yunni/spark
that referenced
this pull request
Feb 27, 2017
…rser ### What changes were proposed in this pull request? Currently, if `NumPartitions` is not set in RepartitionByExpression, we will set it using `spark.sql.shuffle.partitions` during Planner. However, this is not following the general resolution process. This PR is to set it in `Parser` and then `Optimizer` can use the value for plan optimization. ### How was this patch tested? Added a test case. Author: Xiao Li <gatorsmile@gmail.com> Closesapache#16988 from gatorsmile/resolveRepartition.
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Currently, if
NumPartitionsis not set in RepartitionByExpression, we will set it usingspark.sql.shuffle.partitionsduring Planner. However, this is not following the general resolution process. This PR is to set it inParserand thenOptimizercan use the value for plan optimization.How was this patch tested?
Added a test case.