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 2022/12/09 06:28:34 UTC

[GitHub] [spark] shenjiayu17 commented on pull request #38534: [SPARK-38505][SQL] Make partial aggregation adaptive

shenjiayu17 commented on PR #38534:
URL: https://github.com/apache/spark/pull/38534#issuecomment-1343908559

   Hi @wangyum. I'm very interested in this optimization on partial aggregation. But why does it need these child node limit? Do they make some influence on function or performance?
   ```
   private[sql] lazy val isAdaptivePartialAggregationEnabled = {
       requiredChildDistributionExpressions.isEmpty && groupingAttributes.nonEmpty &&
         conf.adaptivePartialAggregationThreshold > 0 &&
         conf.adaptivePartialAggregationThreshold < (1 << conf.fastHashAggregateRowMaxCapacityBit) && {
         child
           .collectUntil(p => p.isInstanceOf[WholeStageCodegenExec] ||
             !p.isInstanceOf[CodegenSupport] ||
             p.isInstanceOf[LeafExecNode]).forall {
           case _: ProjectExec | _: FilterExec | _: ColumnarToRowExec => true
           case _: SerializeFromObjectExec => true
           case _: InputAdapter => true
           // HashAggregateExec, ExpandExec, SortMergeJoinExec ...
           case _ => false
         }
       }
     }
   ```


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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