Github user clockfly commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14176#discussion_r76340181
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -518,15 +573,30 @@ case class HashAggregateExec(
         val doAgg = ctx.freshName("doAggregateWithKeys")
         val peakMemory = metricTerm(ctx, "peakMemory")
         val spillSize = metricTerm(ctx, "spillSize")
    +
    +    def generateGenerateCode(): String = {
    +      if (isFastHashMapEnabled) {
    +        if (isVectorizedHashMapEnabled) {
    +          s"""
    +               | 
${fastHashMapGenerator.asInstanceOf[VectorizedHashMapGenerator].generate()}
    +          """.stripMargin
    +        } else {
    +          s"""
    +               | 
${fastHashMapGenerator.asInstanceOf[RowBasedHashMapGenerator].generate()}
    +          """.stripMargin
    +        }
    --- End diff --
    
    If we are sure RowBasedHashMapGenerator is better than 
VectorizedHashMapGenerator in all cases, then probably we should not put both 
implementations in the production code. If we have requirements like 
performance benchmarking, maybe we should add the code in test.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to