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 2020/09/20 01:18:40 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #29810: [SPARK-32940][SQL] Collect, first and last should be deterministic aggregate functions

HyukjinKwon commented on a change in pull request #29810:
URL: https://github.com/apache/spark/pull/29810#discussion_r491638784



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala
##########
@@ -63,9 +63,6 @@ case class First(child: Expression, ignoreNulls: Boolean)
 
   override def nullable: Boolean = true
 
-  // First is not a deterministic function.
-  override lazy val deterministic: Boolean = false

Review comment:
       I think you may need to update the `note` above and says like "The function can be non-deterministic because its results depend on the order of input rows which are usually non-deterministic after a shuffle." You might need to update `functions.py`, `functions.R` and `functions.scala`




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



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