Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19478#discussion_r144221518
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -79,7 +79,9 @@ abstract class Expression extends TreeNode[Expression] {
* An example would be `SparkPartitionID` that relies on the partition
id returned by TaskContext.
* By default leaf expressions are deterministic as
Nil.forall(_.deterministic) returns true.
*/
- def deterministic: Boolean = children.forall(_.deterministic)
+ lazy val deterministic: Boolean = isDeterministic
--- End diff --
How much time this can save? But why won't just:
```scala
lazy val deterministic: Boolean = children.forall(_.deterministic)
```
I think it is equal to this change.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]