Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/21416#discussion_r190966442
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Column.scala ---
@@ -786,6 +787,24 @@ class Column(val expr: Expression) extends Logging {
@scala.annotation.varargs
def isin(list: Any*): Column = withExpr { In(expr,
list.map(lit(_).expr)) }
+ /**
+ * A boolean expression that is evaluated to true if the value of this
expression is contained
+ * by the provided Set.
+ *
+ * @group expr_ops
+ * @since 2.4.0
+ */
+ def isinSet(values: scala.collection.Set[_]): Column =
isin(values.toSeq: _*)
--- End diff --
Sound good.
How do we want to do the naming? `def isin` has `i` as lower case. If we
do `isInCollection`, it will be slightly inconsistent.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]