beliefer commented on code in PR #41534:
URL: https://github.com/apache/spark/pull/41534#discussion_r1227500661
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -5883,4 +5883,65 @@ object functions {
}
// scalastyle:off line.size.limit
+
//////////////////////////////////////////////////////////////////////////////////////////////
+ // Conditional Functions
+
//////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * If `predicate` evaluates to true, then returns `trueValue`; otherwise
returns `falseValue`.
+ *
+ * @group conditional_funcs
+ * @since 3.5.0
+ */
+ def `if`(predicate: Column, trueValue: Column, falseValue: Column): Column =
+ Column.fn("if", predicate, trueValue, falseValue)
+
+ /**
+ * Returns `col2` if `col1` is null, or `col1` otherwise.
+ *
+ * @group conditional_funcs
+ * @since 3.5.0
+ */
+ def ifnull(col1: Column, col2: Column): Column = Column.fn("ifnull", col1,
col2)
+
+ /**
+ * Returns true if `col` is not null, or false otherwise.
+ *
+ * @group conditional_funcs
+ * @since 3.5.0
+ */
+ def isnotnull(col: Column): Column = Column.fn("isnotnull", col)
+
+ /**
+ * Returns same result as the EQUAL(=) operator for non-null operands, but
returns true if both
+ * are null, false if one of the them is null.
+ *
+ * @group conditional_funcs
+ * @since 3.5.0
+ */
+ def equal_null(col1: Column, col2: Column): Column = Column.fn("equal_null",
col1, col2)
Review Comment:
I think we should fix it together.
--
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]