diff options
author | kai <kaizeng@eecs.berkeley.edu> | 2015-01-30 23:19:10 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-01-30 23:19:10 -0800 |
commit | f54c9f607bd8d72eb52cdb55498cb9ec36e56fa8 (patch) | |
tree | 98759accfb322c6730c0a060d2f5b0e2b66864c9 /sql | |
parent | 740a56862ba82aeb4206edf71ce83dc4475e322a (diff) | |
download | spark-f54c9f607bd8d72eb52cdb55498cb9ec36e56fa8.tar.gz spark-f54c9f607bd8d72eb52cdb55498cb9ec36e56fa8.tar.bz2 spark-f54c9f607bd8d72eb52cdb55498cb9ec36e56fa8.zip |
[SQL] remove redundant field "childOutput" from execution.Aggregate, use child.output instead
Author: kai <kaizeng@eecs.berkeley.edu>
Closes #4291 from kai-zeng/aggregate-fix and squashes the following commits:
78658ef [kai] remove redundant field "childOutput"
Diffstat (limited to 'sql')
-rwxr-xr-x[-rw-r--r--] | sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala | 8 |
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) { |