peter-toth commented on issue #23731: [SPARK-26572][SQL] fix aggregate codegen result evaluation URL: https://github.com/apache/spark/pull/23731#issuecomment-462658297 I was thinking of why this following simple code snippet doesn't have the same issue: ``` val baseTable = Seq((1), (1)).toDF("idx") val distinctWithId = baseTable.withColumn("id", monotonically_increasing_id()) val x = baseTable.join(distinctWithId, "idx") x.show() ``` because it produces the expected ``` +---+----------+ |idx| id| +---+----------+ | 1| 0| | 1| 0| | 1|8589934592| | 1|8589934592| +---+----------+ ``` and it seems because `doConsume` in `ProjectExec` evaluates non deterministic result vars before passing to `Join`. So I think it would be analogous to handle non-determinism in aggregate.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
