You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/29 02:33:41 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #24238: [SPARK-27320][SQL]Replacing index with iterator to traverse the expressions list in AggregationIterator, which make it simpler

HyukjinKwon commented on a change in pull request #24238: [SPARK-27320][SQL]Replacing index with iterator to traverse the expressions list in AggregationIterator, which make it simpler
URL: https://github.com/apache/spark/pull/24238#discussion_r270263808
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/AggregationIterator.scala
 ##########
 @@ -74,13 +74,12 @@ abstract class AggregationIterator(
       startingInputBufferOffset: Int): Array[AggregateFunction] = {
     var mutableBufferOffset = 0
     var inputBufferOffset: Int = startingInputBufferOffset
-    val expressionsLength = expressions.length
-    val functions = new Array[AggregateFunction](expressionsLength)
+    val functions = new Array[AggregateFunction](expressions.length)
     var i = 0
     val inputAttributeSeq: AttributeSeq = inputAttributes
-    while (i < expressionsLength) {
-      val func = expressions(i).aggregateFunction
-      val funcWithBoundReferences: AggregateFunction = expressions(i).mode match {
+    for (expression <- expressions)  {
 
 Review comment:
   Looks there's two spaces between `expressions)  {`. Let's make it one

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org