Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19811#discussion_r157798132
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -583,42 +579,41 @@ case class HashAggregateExec(
         val thisPlan = ctx.addReferenceObj("plan", this)
     
         // Create a name for the iterator from the fast hash map.
    -    val iterTermForFastHashMap = ctx.freshName("fastHashMapIter")
    -    if (isFastHashMapEnabled) {
    +    val iterTermForFastHashMap = if (isFastHashMapEnabled) {
           // Generates the fast hash map class and creates the fash hash map 
term.
    -      fastHashMapTerm = ctx.freshName("fastHashMap")
           val fastHashMapClassName = ctx.freshName("FastHashMap")
           if (isVectorizedHashMapEnabled) {
             val generatedMap = new VectorizedHashMapGenerator(ctx, 
aggregateExpressions,
               fastHashMapClassName, groupingKeySchema, bufferSchema).generate()
             ctx.addInnerClass(generatedMap)
     
    -        ctx.addMutableState(fastHashMapClassName, fastHashMapTerm,
    -          s"$fastHashMapTerm = new $fastHashMapClassName();")
    -        ctx.addMutableState(s"java.util.Iterator<InternalRow>", 
iterTermForFastHashMap)
    +        fastHashMapTerm = ctx.addMutableState(fastHashMapClassName, 
"vectorizedHastHashMap",
    --- End diff --
    
    shall we force inline it too?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to