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 2021/12/15 01:09:24 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #34470: [SPARK-37199][SQL] Add deterministic field to QueryPlan

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala
##########
@@ -84,6 +84,13 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]]
     AttributeSet.fromAttributeSets(expressions.map(_.references)) -- producedAttributes
   }
 
+  /**
+   * Returns true when the all the expressions in the current node as well as all of its children
+   * are deterministic
+   */
+  lazy val deterministic: Boolean = expressions.forall(_.deterministic) &&

Review comment:
       qq: should we mark all non-deterministic plans as so? e.g. `SampleExec`?




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