uros-db commented on code in PR #46165:
URL: https://github.com/apache/spark/pull/46165#discussion_r1575711699
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/maskExpressions.scala:
##########
@@ -84,7 +86,7 @@ object MaskExpressionBuilder extends ExpressionBuilder {
val digitCharArg = InputParameter("digitChar",
Some(Literal(Mask.MASKED_DIGIT)))
val otherCharArg = InputParameter(
"otherChar",
- Some(Literal(Mask.MASKED_IGNORE, StringType)))
+ Some(Literal(Mask.MASKED_IGNORE, SQLConf.get.defaultStringType)))
Review Comment:
`MASKED_IGNORE` is null, so we have to specify a type for this literal in
func signature
so instead of `StringType(0)` it should only be correct to get the default
string type
we enforce implicit cast for this expression, so in a situation where the
first parameter takes the default string type (for example when not using
explicit collation) there would be a conflict with this `StringType(0)` if it
were to stay here
--
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]