ivoson commented on code in PR #41718:
URL: https://github.com/apache/spark/pull/41718#discussion_r1242427787


##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala:
##########
@@ -5537,6 +5568,61 @@ class DataFrameFunctionsSuite extends QueryTest with 
SharedSparkSession {
     )
   }
 
+  test("json_array_length function") {

Review Comment:
   thanks, moved to `JsonFunctionsSuite`



##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -6379,6 +6428,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
+  /**
+   * Masks the given string value. The function replaces upper-case characters 
with specific
+   * character, lower-case characters with '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
+   * @param upperChar character to replace upper-case characters with. Specify 
NULL to retain original character.
+   * @group string_funcs
+   * @since 3.5.0
+   */
+  // scalastyle:on line.size.limit
+  def mask(input: Column, upperChar: Column): Column = withExpr {
+    new Mask(input.expr, upperChar.expr)
+  }
+
+  // scalastyle:off line.size.limit
+  /**
+   * Masks the given string value. The function replaces upper-case, 
lower-case characters
+   * with specific characters, and numbers with 'n'.

Review Comment:
   Thanks.



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