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 2022/11/07 19:17:14 UTC

[GitHub] [spark] srowen commented on a diff in pull request #38533: [SPARK-41029][SQL] Optimize constructor use of `GenericArrayData` for Scala 2.13

srowen commented on code in PR #38533:
URL: https://github.com/apache/spark/pull/38533#discussion_r1015808514


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Mode.scala:
##########
@@ -158,7 +158,7 @@ case class PandasMode(
         modes.append(key)
       }
     }
-    new GenericArrayData(modes.toSeq)
+    new GenericArrayData(modes)

Review Comment:
   This looks fine. The only concern I can think of is if this means the GenericArrayData accesses a mutable underlying array then from an ArrayBuffer, but this may be no problem given the usages changed here. The ArrayBuffers are local vars.



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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