Github user marmbrus commented on a diff in the pull request: https://github.com/apache/spark/pull/1822#discussion_r16196975 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala --- @@ -168,32 +208,68 @@ case class Aggregate( i += 1 } } - - new Iterator[Row] { + val iterPair = new Iterator[(Row, Array[AggregateFunction])] { private[this] val hashTableIter = hashTable.entrySet().iterator() - private[this] val aggregateResults = new GenericMutableRow(computedAggregates.length) - private[this] val resultProjection = - new InterpretedMutableProjection( - resultExpressions, computedSchema ++ namedGroups.map(_._2)) - private[this] val joinedRow = new JoinedRow - override final def hasNext: Boolean = hashTableIter.hasNext - override final def next(): Row = { + override final def next(): (Row, Array[AggregateFunction]) = { --- End diff -- I am a little concerned about the addition of an extra tuple object allocation here. This may not be a problem, but we'll want to run some benchmarks and make sure that we are not slowing down the on-heap version here.
--- 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