cloud-fan commented on code in PR #46165: URL: https://github.com/apache/spark/pull/46165#discussion_r1577440230
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala: ########## @@ -79,12 +81,14 @@ import org.apache.spark.unsafe.types.UTF8String object MaskExpressionBuilder extends ExpressionBuilder { override def functionSignature: Option[FunctionSignature] = { val strArg = InputParameter("str") - val upperCharArg = InputParameter("upperChar", Some(Literal(Mask.MASKED_UPPERCASE))) - val lowerCharArg = InputParameter("lowerChar", Some(Literal(Mask.MASKED_LOWERCASE))) - val digitCharArg = InputParameter("digitChar", Some(Literal(Mask.MASKED_DIGIT))) - val otherCharArg = InputParameter( - "otherChar", - Some(Literal(Mask.MASKED_IGNORE, StringType))) + val upperCharArg = InputParameter("upperChar", + Some(Literal(Mask.MASKED_UPPERCASE, SQLConf.get.defaultStringType))) Review Comment: nit: we can use `Literal.create`, so that we don't need to convert String to UTF8String ahead. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org