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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala:
##########
@@ -17,27 +17,29 @@
 
 package org.apache.spark.sql.catalyst.expressions
 
+import org.apache.spark.sql.catalyst.InternalRow
 import org.apache.spark.sql.catalyst.analysis.TypeCheckResult
 import org.apache.spark.sql.catalyst.analysis.TypeCheckResult.DataTypeMismatch
 import org.apache.spark.sql.catalyst.expressions.codegen._
+import org.apache.spark.sql.catalyst.expressions.codegen.Block._
 import org.apache.spark.sql.errors.QueryErrorsBase
 import org.apache.spark.sql.types.{AbstractDataType, DataType, StringType}
 import org.apache.spark.unsafe.types.UTF8String
 
 // scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = """_FUNC_(input[, upperChar, lowerChar, digitChar, otherChar]) - 
masks the given string value.
+  usage =
+    """_FUNC_(input[, upperChar, lowerChar, digitChar, otherChar]) - masks the 
given string value.
        The function replaces characters with 'X' or 'x', and numbers with 'n'.
        This can be useful for creating copies of tables with sensitive 
information removed.
-       Error behavior: null value as replacement argument will throw 
AnalysisError.
       """,
   arguments = """
     Arguments:
       * input      - string value to mask. Supported types: STRING, VARCHAR, 
CHAR
-      * upperChar  - character to replace upper-case characters with. Specify 
-1 to retain original character. Default value: 'X'
-      * lowerChar  - character to replace lower-case characters with. Specify 
-1 to retain original character. Default value: 'x'
-      * digitChar  - character to replace digit characters with. Specify -1 to 
retain original character. Default value: 'n'
-      * otherChar  - character to replace all other characters with. Specify 
-1 to retain original character. Default value: -1
+      * upperChar  - character to replace upper-case characters with. Specify 
NULL to retain original character. Default value: 'X'
+      * lowerChar  - character to replace lower-case characters with. Specify 
NULL to retain original character. Default value: 'x'
+      * digitChar  - character to replace digit characters with. Specify NULL 
to retain original character. Default value: 'n'
+      * otherChar  - character to replace all other characters with. Specify 
NULL to retain original character. Default value: NULL

Review Comment:
   ```suggestion
         * otherChar  - character to replace all other characters with. Specify 
NULL to retain original character. Default value: Retain original character.
   ```



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