Github user aokolnychyi commented on a diff in the pull request:
https://github.com/apache/spark/pull/18692#discussion_r154164912
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExpressionSet.scala
---
@@ -27,6 +27,8 @@ object ExpressionSet {
expressions.foreach(set.add)
set
}
+
+ val empty: ExpressionSet = ExpressionSet(Nil)
--- End diff --
I thought that writing ``ExpressionSet.empty`` would be more readable than
``ExpressionSet(Nil)``. Usually, mutable collections have ``def empty()`` and
immutable ones have separate objects that represent empty collections (e.g.,
``Nil``, ``Stream.Empty``). I defined ``val empty`` since ``ExpressionSet`` is
immutable.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]