Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-fan committed Nov 12, 2019
1 parent e5d0d5d commit 28416df
Showing 1 changed file with 5 additions and 6 deletions.
Expand Up @@ -685,9 +685,9 @@ case class HashAggregateExec(

val thisPlan = ctx.addReferenceObj("plan", this)

// Create a name for the iterator from the fast hash map.
// Create a name for the iterator from the fast hash map, and the code to create fast hash map.
val (iterTermForFastHashMap, createFastHashMap) = if (isFastHashMapEnabled) {
// Generates the fast hash map class and creates the fash hash map term.
// Generates the fast hash map class and creates the fast hash map term.
val fastHashMapClassName = ctx.freshName("FastHashMap")
if (isVectorizedHashMapEnabled) {
val generatedMap = new VectorizedHashMapGenerator(ctx, aggregateExpressions,
Expand All @@ -696,9 +696,9 @@ case class HashAggregateExec(

// Inline mutable state since not many aggregation operations in a task
fastHashMapTerm = ctx.addMutableState(
fastHashMapClassName, "vectorizedHastHashMap", forceInline = true)
fastHashMapClassName, "vectorizedFastHashMap", forceInline = true)
val iter = ctx.addMutableState(
s"java.util.Iterator<InternalRow>",
"java.util.Iterator<InternalRow>",
"vectorizedFastHashMapIter",
forceInline = true)
val create = s"$fastHashMapTerm = new $fastHashMapClassName();"
Expand Down Expand Up @@ -726,8 +726,7 @@ case class HashAggregateExec(
"mapIter", forceInline = true)
// create hashMap
val hashMapClassName = classOf[UnsafeFixedWidthAggregationMap].getName
hashMapTerm = ctx.addMutableState(
hashMapClassName, "hashMap", forceInline = true)
hashMapTerm = ctx.addMutableState(hashMapClassName, "hashMap", forceInline = true)
sorterTerm = ctx.addMutableState(classOf[UnsafeKVExternalSorter].getName, "sorter",
forceInline = true)

Expand Down

0 comments on commit 28416df

Please sign in to comment.