vinodkc commented on code in PR #39577:
URL: https://github.com/apache/spark/pull/39577#discussion_r1080534998


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala:
##########
@@ -207,6 +204,37 @@ case class Mask(
           s"transformInput($input, $upperChar, $lowerChar, $digitChar, 
$otherChar);"
       })
 
+  /**
+   * Short hand for generating quinary evaluation code. If either of the 
sub-expressions is null,
+   * the result of this computation is assumed to be null.
+   *
+   * @param f
+   *   function that accepts the 5 non-null evaluation result names of 
children and returns Java
+   *   code to compute the output.
+   */
+  override protected def nullSafeCodeGen(

Review Comment:
   nullSafeCodeGen here is an overridden  implementation to allow nulls value 
the input parameters (not filtering null values), null will be check later in 
mask method. 
   If we put this special implementation  in QuinaryExpression, future classed 
extending  QuinaryExpression will have to override it to handle null check.
   That is why overriding nullSafeCodeGen here



-- 
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]

Reply via email to