cloud-fan commented on code in PR #41864:
URL: https://github.com/apache/spark/pull/41864#discussion_r1262236718


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala:
##########
@@ -321,3 +322,21 @@ object Mask {
     }
   }
 }
+
+object MaskExpressionBuilder extends ExpressionBuilder {
+  override def functionSignatures: Option[Seq[FunctionSignature]] = {
+    val strArg = NamedArgument("str")
+    val upperCharArg = NamedArgument("upperChar", 
Some(Literal(Mask.MASKED_UPPERCASE)))
+    val lowerCharArg = NamedArgument("lowerChar", 
Some(Literal(Mask.MASKED_LOWERCASE)))
+    val digitCharArg = NamedArgument("digitChar", 
Some(Literal(Mask.MASKED_DIGIT)))
+    val otherCharArg = NamedArgument("otherChar", 
Some(Literal(Mask.MASKED_IGNORE)))
+    val functionSignature: FunctionSignature = FunctionSignature(Seq(
+      strArg, upperCharArg, lowerCharArg, digitCharArg, otherCharArg))
+    Some(Seq(functionSignature))
+  }
+
+  override def build(funcName: String, expressions: Seq[Expression]): 
Expression = {

Review Comment:
   shall we check the number of arguments as we did in 
https://github.com/apache/spark/pull/41864/files#diff-66a6cfe45ec7e9e6be23be40f8ccedf9ec84887abfa6e7d3b9c34ea85bf85e91R222
 ?



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