aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rwxr-xr-x[-rw-r--r--]sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala8
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala
index be9f155253..ad44a01d0e 100644..100755
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala
@@ -56,10 +56,6 @@ case class Aggregate(
}
}
- // HACK: Generators don't correctly preserve their output through serializations so we grab
- // out child's output attributes statically here.
- private[this] val childOutput = child.output
-
override def output = aggregateExpressions.map(_.toAttribute)
/**
@@ -81,7 +77,7 @@ case class Aggregate(
case a: AggregateExpression =>
ComputedAggregate(
a,
- BindReferences.bindReference(a, childOutput),
+ BindReferences.bindReference(a, child.output),
AttributeReference(s"aggResult:$a", a.dataType, a.nullable)())
}
}.toArray
@@ -150,7 +146,7 @@ case class Aggregate(
} else {
child.execute().mapPartitions { iter =>
val hashTable = new HashMap[Row, Array[AggregateFunction]]
- val groupingProjection = new InterpretedMutableProjection(groupingExpressions, childOutput)
+ val groupingProjection = new InterpretedMutableProjection(groupingExpressions, child.output)
var currentRow: Row = null
while (iter.hasNext) {