We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 244adc6 commit ba14173Copy full SHA for ba14173
1 file changed
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/AggregationIterator.scala
@@ -180,9 +180,9 @@ abstract class AggregationIterator(
180
inputAttributes: Seq[Attribute]): (InternalRow, InternalRow) => Unit = {
181
val joinedRow = new JoinedRow
182
if (expressions.nonEmpty) {
183
- val mergeExpressions = functions.zip(expressions).flatMap {
184
- case (ae: DeclarativeAggregate, expression) =>
185
- expression.mode match {
+ val mergeExpressions = functions.zipWithIndex.collect {
+ case (ae: DeclarativeAggregate, i) =>
+ expressions(i).mode match {
186
case Partial | Complete => ae.updateExpressions
187
case PartialMerge | Final => ae.mergeExpressions
188
}
0 commit comments