You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/06 12:57:04 UTC

[GitHub] [spark] wangyum opened a new pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

wangyum opened a new pull request #32063:
URL: https://github.com/apache/spark/pull/32063


   ### What changes were proposed in this pull request?
   
   Avoid shuffle if possible when bucket join type do not match. For example:
   ```sql
   set spark.sql.autoBroadcastJoinThreshold=-1;
   CREATE TABLE t1 using parquet clustered by (id) into 200 buckets AS SELECT cast(id as bigint) FROM range(1000);
   CREATE TABLE t2 using parquet clustered by (id) into 200 buckets AS SELECT cast(id as int) FROM range(500);
   SELECT * FROM t1 JOIN t2 ON (t1.id = t2.id);
   ```
   
   Before this pr:
   ```
   == Physical Plan ==
   AdaptiveSparkPlan isFinalPlan=false
   +- SortMergeJoin [id#14L], [cast(id#15 as bigint)], Inner
      :- Sort [id#14L ASC NULLS FIRST], false, 0
      :  +- Filter isnotnull(id#14L)
      :     +- FileScan parquet default.t1[id#14L] SelectedBucketsCount: 200 out of 200
      +- Sort [cast(id#15 as bigint) ASC NULLS FIRST], false, 0
         +- Exchange hashpartitioning(cast(id#15 as bigint), 200), ENSURE_REQUIREMENTS, [id=#58]
            +- Filter isnotnull(id#15)
               +- FileScan parquet default.t2[id#15]
   ```
   After this pr:
   ```
   == Physical Plan ==
   AdaptiveSparkPlan isFinalPlan=false
   +- SortMergeJoin [id#14L], [cast(id#15 as bigint)], Inner
      :- Sort [id#14L ASC NULLS FIRST], false, 0
      :  +- Filter isnotnull(id#14L)
      :     +- FileScan parquet default.t1[id#14L] SelectedBucketsCount: 200 out of 200
      +- Sort [cast(id#15 as bigint) ASC NULLS FIRST], false, 0
         +- Filter isnotnull(id#15)
            +- FileScan parquet default.t2[id#15] SelectedBucketsCount: 200 out of 200
   ```
   
   
   ### Why are the changes needed?
   
   Avoid shuffle to improve query performance.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   
   ### How was this patch tested?
   
   Unit test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814283664


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/136945/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814148959


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41521/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814267589


   **[Test build #136945 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136945/testReport)** for PR 32063 at commit [`528bd27`](https://github.com/apache/spark/commit/528bd2725ccaae6ab4c5d6ac3fd86493256b5c26).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814283664


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/136945/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814148959


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/41521/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814140200


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41521/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814105455


   **[Test build #136945 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136945/testReport)** for PR 32063 at commit [`528bd27`](https://github.com/apache/spark/commit/528bd2725ccaae6ab4c5d6ac3fd86493256b5c26).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814105455


   **[Test build #136945 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/136945/testReport)** for PR 32063 at commit [`528bd27`](https://github.com/apache/spark/commit/528bd2725ccaae6ab4c5d6ac3fd86493256b5c26).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32063:
URL: https://github.com/apache/spark/pull/32063#issuecomment-814144014


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41521/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] wangyum closed pull request #32063: [SPARK-34966][SQL] Avoid shuffle if possible when bucket join type do not match

Posted by GitBox <gi...@apache.org>.
wangyum closed pull request #32063:
URL: https://github.com/apache/spark/pull/32063


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org