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 2020/03/11 15:16:36 UTC

[GitHub] [spark] cloud-fan opened a new pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

cloud-fan opened a new pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879
 
 
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   AQE has a perf regression when using the default settings: if we coalesce the shuffle partitions into one or few partitions, we may leave many CPU cores idle and the perf is worse than with AQE off (which leverages all CPU cores).
   
   Technically, this is not a bad thing. If there are many queries running at the same time, it's better to coalesce shuffle partitions into fewer partitions. However, the default settings of AQE should try to avoid any perf regression as possible as we can.
   
   This PR changes the default value of minPartitionNum when coalescing shuffle partitions, to be `SparkContext.defaultParallelism`, so that AQE can leverage all the CPU cores.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   avoid AQE perf regression
   
   ### Does this PR introduce any user-facing change?
   <!--
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   existing tests

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004751
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan closed pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597770141
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044734
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24433/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597841738
 
 
   **[Test build #119676 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119676/testReport)** for PR 27879 at commit [`6db3394`](https://github.com/apache/spark/commit/6db3394b0a2e30855502e09c2939c5034d2606a6).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `case class CoalesceShufflePartitions(session: SparkSession) extends Rule[SparkPlan] `

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044228
 
 
   **[Test build #119703 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119703/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037856
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119695/
   Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597900067
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119679/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598157352
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597842776
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119676/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037826
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037688
 
 
   **[Test build #119695 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119695/testReport)** for PR 27879 at commit [`6a587d9`](https://github.com/apache/spark/commit/6a587d9114c1530638ad3a24e99d4ac92be0362f).
    * This patch **fails due to an unknown error code, -9**.
    * 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597842776
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119676/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597899344
 
 
   **[Test build #119679 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119679/testReport)** for PR 27879 at commit [`73e74ed`](https://github.com/apache/spark/commit/73e74ed0d147d83208578832b7c71a74a8a9f603).
    * This patch passes all 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037851
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044228
 
 
   **[Test build #119703 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119703/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598157363
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119703/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] JkSelf commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
JkSelf commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391399870
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeSkewedJoin.scala
 ##########
 @@ -266,7 +266,8 @@ case class OptimizeSkewedJoin(conf: SQLConf) extends Rule[SparkPlan] {
         firstPartitionIndex = nonSkewPartitionIndices.head,
         // `lastPartitionIndex` is exclusive.
         lastPartitionIndex = nonSkewPartitionIndices.last + 1,
-        advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES))
+        advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
+        minNumPartitions = 1)
 
 Review comment:
   We may still face the perf degradation issue if we set `minNumPartitions ` to 1 when handling skew join.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597695671
 
 
   **[Test build #119676 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119676/testReport)** for PR 27879 at commit [`6db3394`](https://github.com/apache/spark/commit/6db3394b0a2e30855502e09c2939c5034d2606a6).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004764
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24424/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597696366
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391116725
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
         val partitionSpecs = ShufflePartitionsUtil.coalescePartitions(
           validMetrics.toArray,
           firstPartitionIndex = 0,
           lastPartitionIndex = distinctNumPreShufflePartitions.head,
           advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
-          minNumPartitions = conf.minShufflePartitionNum)
+          minNumPartitions = minPartitionNum)
 
 Review comment:
   We don't. We should make it clear in `ShufflePartitionsUtil`

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] JkSelf commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
JkSelf commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014522
 
 
   LGTM. 

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014039
 
 
   **[Test build #119697 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119697/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014305
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004764
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24424/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] JkSelf commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
JkSelf commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597978524
 
 
   We may can remove  the default value `minNumPartitions `in `ShufflePartitionsCoalescer.coalescePartitions`.  And also pass the `sparkSession `in `OptimizeSkewedJoin` to get the `SparkContext.defaultParallelism` when reducing partition number  in the rule of `OptimizeSkewedJoin`. 

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597769475
 
 
   **[Test build #119679 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119679/testReport)** for PR 27879 at commit [`73e74ed`](https://github.com/apache/spark/commit/73e74ed0d147d83208578832b7c71a74a8a9f603).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391142899
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
         val partitionSpecs = ShufflePartitionsUtil.coalescePartitions(
           validMetrics.toArray,
           firstPartitionIndex = 0,
           lastPartitionIndex = distinctNumPreShufflePartitions.head,
           advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
-          minNumPartitions = conf.minShufflePartitionNum)
+          minNumPartitions = minPartitionNum)
 
 Review comment:
   After looking into `ShufflePartitionsUtil`, we may still do coalesce if the partition sizes are really really small. The target size is at least 16 bytes, so if all partitions are 0 size, we still coalesce.
   
   I don't know why we pick 16, but this makes sense to be as it's obvious an overhead if we launch a task to read just 16 bytes.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597900059
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044730
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037851
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004414
 
 
   **[Test build #119695 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119695/testReport)** for PR 27879 at commit [`6a587d9`](https://github.com/apache/spark/commit/6a587d9114c1530638ad3a24e99d4ac92be0362f).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037831
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119697/
   Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004414
 
 
   **[Test build #119695 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119695/testReport)** for PR 27879 at commit [`6a587d9`](https://github.com/apache/spark/commit/6a587d9114c1530638ad3a24e99d4ac92be0362f).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597842770
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037826
 
 
   Merged build finished. Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598004751
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044734
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24433/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014307
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24426/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037856
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119695/
   Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014307
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24426/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598002761
 
 
   > We may can remove the default value minNumPartitions in ShufflePartitionsCoalescer.coalescePartitions. 
   
   We can remove the default value, but it may not be a good idea to pass `SparkSession`, as it makes the method harder to 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597770153
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24408/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597900059
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037693
 
 
   **[Test build #119697 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119697/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).
    * This patch **fails due to an unknown error code, -9**.
    * 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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597694209
 
 
   cc @maryannxue @JkSelf 

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598155929
 
 
   **[Test build #119703 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119703/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).
    * This patch passes all 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


With regards,
Apache Git Services

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


[GitHub] [spark] maryannxue commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
maryannxue commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391111486
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
 
 Review comment:
   nit: We fall back to Spark default parallelism if the minimum number of coalesced partition is not set, so to avoid regressions compared to no coalescing.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391139385
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
 
 Review comment:
   Yup

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597695671
 
 
   **[Test build #119676 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119676/testReport)** for PR 27879 at commit [`6db3394`](https://github.com/apache/spark/commit/6db3394b0a2e30855502e09c2939c5034d2606a6).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391142899
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
         val partitionSpecs = ShufflePartitionsUtil.coalescePartitions(
           validMetrics.toArray,
           firstPartitionIndex = 0,
           lastPartitionIndex = distinctNumPreShufflePartitions.head,
           advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
-          minNumPartitions = conf.minShufflePartitionNum)
+          minNumPartitions = minPartitionNum)
 
 Review comment:
   After looking into `ShufflePartitionsUtil`, we may still do coalesce if the partition sizes are really really small. The target size is at least 16 bytes, so if all partitions are 0 size, we still coalesce.
   
   I don't know why we pick 16, but this makes sense to me as it's obvious an overhead if we launch a task to read just 16 bytes.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598157352
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597696366
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] Ngone51 commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391358885
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
         val partitionSpecs = ShufflePartitionsUtil.coalescePartitions(
           validMetrics.toArray,
           firstPartitionIndex = 0,
           lastPartitionIndex = distinctNumPreShufflePartitions.head,
           advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
-          minNumPartitions = conf.minShufflePartitionNum)
+          minNumPartitions = minPartitionNum)
 
 Review comment:
   I see.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597770141
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597696377
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24405/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597696377
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24405/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] Ngone51 commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391086848
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
         val partitionSpecs = ShufflePartitionsUtil.coalescePartitions(
           validMetrics.toArray,
           firstPartitionIndex = 0,
           lastPartitionIndex = distinctNumPreShufflePartitions.head,
           advisoryTargetSize = conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES),
-          minNumPartitions = conf.minShufflePartitionNum)
+          minNumPartitions = minPartitionNum)
 
 Review comment:
   So, according to the PR description, do we still need to coalesce if the number of partitions has already been less than `minPartitionNum`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] Ngone51 commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597963467
 
 
   Also, do we need to update the default value of `minNumPartitions` in `ShufflePartitionsCoalescer.coalescePartitions`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598185809
 
 
   thanks for review, merging to master/3.0!

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597770153
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24408/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014039
 
 
   **[Test build #119697 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119697/testReport)** for PR 27879 at commit [`4f1b33b`](https://github.com/apache/spark/commit/4f1b33ba03cb0a9b32f2deb4fb8a4df0d869a72b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597769475
 
 
   **[Test build #119679 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119679/testReport)** for PR 27879 at commit [`73e74ed`](https://github.com/apache/spark/commit/73e74ed0d147d83208578832b7c71a74a8a9f603).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597842770
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#discussion_r391129740
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/CoalesceShufflePartitions.scala
 ##########
 @@ -66,12 +68,16 @@ case class CoalesceShufflePartitions(conf: SQLConf) extends Rule[SparkPlan] {
       val distinctNumPreShufflePartitions =
         validMetrics.map(stats => stats.bytesByPartitionId.length).distinct
       if (validMetrics.nonEmpty && distinctNumPreShufflePartitions.length == 1) {
+        // To avoid perf regression, we by default set the minimum number of coalesced partitions
+        // to Spark default parallelism, so that we don't keep CPU cores idle.
+        val minPartitionNum = conf.getConf(SQLConf.COALESCE_PARTITIONS_MIN_PARTITION_NUM)
+          .getOrElse(session.sparkContext.defaultParallelism)
 
 Review comment:
   This is the reason why we need `session` instead of `conf`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598014305
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598043089
 
 
   retest this please

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-597900067
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119679/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598157363
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119703/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598044730
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27879: [SPARK-31124][SQL] change the default value of minPartitionNum in AQE
URL: https://github.com/apache/spark/pull/27879#issuecomment-598037831
 
 
   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119697/
   Test FAILed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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