You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/01/31 08:19:12 UTC
spark git commit: [SQL] remove redundant field "childOutput" from
execution.Aggregate, use child.output instead
Repository: spark
Updated Branches:
refs/heads/master 740a56862 -> f54c9f607
[SQL] remove redundant field "childOutput" from execution.Aggregate, use child.output instead
Author: kai <ka...@eecs.berkeley.edu>
Closes #4291 from kai-zeng/aggregate-fix and squashes the following commits:
78658ef [kai] remove redundant field "childOutput"
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f54c9f60
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f54c9f60
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f54c9f60
Branch: refs/heads/master
Commit: f54c9f607bd8d72eb52cdb55498cb9ec36e56fa8
Parents: 740a568
Author: kai <ka...@eecs.berkeley.edu>
Authored: Fri Jan 30 23:19:10 2015 -0800
Committer: Reynold Xin <rx...@databricks.com>
Committed: Fri Jan 30 23:19:10 2015 -0800
----------------------------------------------------------------------
.../scala/org/apache/spark/sql/execution/Aggregate.scala | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/f54c9f60/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala
----------------------------------------------------------------------
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
old mode 100644
new mode 100755
index be9f155..ad44a01
--- 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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org