panbingkun commented on code in PR #41534:
URL: https://github.com/apache/spark/pull/41534#discussion_r1230509831
##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -6229,6 +6229,71 @@ object functions {
Bucket(Literal(numBuckets), e.expr)
}
+
//////////////////////////////////////////////////////////////////////////////////////////////
+ // Predicates functions
+
//////////////////////////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Returns `col2` if `col1` is null, or `col1` otherwise.
+ *
+ * @group predicates_funcs
+ * @since 3.5.0
+ */
+ def ifnull(col1: Column, col2: Column): Column = withExpr {
Review Comment:
According to my understanding, 'replacement: Expression' is only an internal
Spark mechanism that exists to cooperate with 'RuntimeReplaceable' and is
designed to reuse expressions. I guess it is actually not needed in our
function.
--
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]