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

    https://github.com/apache/spark/pull/20036#discussion_r158776762
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -587,20 +587,24 @@ case class HashAggregateExec(
               fastHashMapClassName, groupingKeySchema, bufferSchema).generate()
             ctx.addInnerClass(generatedMap)
     
    +        // inline mutable state since not many aggregation operations in a 
task
             fastHashMapTerm = ctx.addMutableState(fastHashMapClassName, 
"vectorizedHastHashMap",
    -          v => s"$v = new $fastHashMapClassName();")
    -        ctx.addMutableState(s"java.util.Iterator<InternalRow>", 
"vectorizedFastHashMapIter")
    +          v => s"$v = new $fastHashMapClassName();", forceInline = true)
    +        ctx.addMutableState(s"java.util.Iterator<InternalRow>", 
"vectorizedFastHashMapIter",
    +          forceInline = true)
           } else {
             val generatedMap = new RowBasedHashMapGenerator(ctx, 
aggregateExpressions,
               fastHashMapClassName, groupingKeySchema, bufferSchema).generate()
             ctx.addInnerClass(generatedMap)
     
    +        // inline mutable state since not many aggregation operations in a 
task
    --- End diff --
    
    nit: `Inline`


---

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

Reply via email to