LuciferYang commented on code in PR #41718:
URL: https://github.com/apache/spark/pull/41718#discussion_r1243588603
##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -6671,6 +6719,100 @@ object functions {
def to_json(e: Column): Column =
to_json(e, Map.empty[String, String])
+ /**
+ * 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.
+ *
+ * @param input string value to mask. Supported types: STRING, VARCHAR, CHAR
+ * @group string_funcs
+ * @since 3.5.0
+ */
+ def mask(input: Column): Column = withExpr {
+ new Mask(input.expr)
+ }
+
+ // scalastyle:off line.size.limit
Review Comment:
ditto, we should avoid to use `scalastyle:off` for the new code
--
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]