cloud-fan commented on a change in pull request #34470:
URL: https://github.com/apache/spark/pull/34470#discussion_r769253437



##########
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:
       yea, if we override this lazy val in a logical plan, we should do it in 
the corresponding physical plan as well.
   
   Moving this to logical plan is also OK, if we don't need it in physical plan 
at all. cc @maryannxue 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to