Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20750#discussion_r174603757
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
---
@@ -328,6 +328,21 @@ trait Nondeterministic extends Expression {
protected def evalInternal(input: InternalRow): Any
}
+/**
+ * A stateful nondeterministic expression. These expressions contain state
+ * that is not stored in the parameter list.
+ */
+trait StatefulNondeterministic extends Nondeterministic {
--- End diff --
In hive stateful and deterministic are orthogonal. If we wanna add this new
trait, I think it's time to figure it out the semantic. Shall we have a new
trait called `Stateful`, or add an assumption that stateful functions must be
nondeterministic?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]