cloud-fan commented on code in PR #50957: URL: https://github.com/apache/spark/pull/50957#discussion_r2102809199
########## sql/core/src/main/scala/org/apache/spark/sql/execution/UnionLoopExec.scala: ########## @@ -183,11 +183,24 @@ case class UnionLoopExec( // Main loop for obtaining the result of the recursive query. while (prevCount > 0 && !limitReached) { var prevPlan: LogicalPlan = null + + // If the recursive part contains non-deterministic expressions that depends on a seed, we + // need to create a new seed since the seed for this expression is set in the analysis, and + // we avoid re-triggering the analysis for every iterative step. + val recursionReseeded = if (recursion.deterministic) { Review Comment: ```suggestion val recursionReseeded = if (currentLevel == 1 || recursion.deterministic) { ``` -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org