mihailom-db commented on code in PR #45383: URL: https://github.com/apache/spark/pull/45383#discussion_r1544100458
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala: ########## @@ -112,12 +112,14 @@ case class Collate(child: Expression, collationName: String) since = "4.0.0", group = "string_funcs") // scalastyle:on line.contains.tab -case class Collation(child: Expression) extends UnaryExpression with RuntimeReplaceable { - override def dataType: DataType = StringType +case class Collation(child: Expression) + extends UnaryExpression with RuntimeReplaceable with ExpectsInputTypes { + override def dataType: DataType = child.dataType Review Comment: I was thinking of some cases when indeterminate comes. What if our costumer wants to concat the collation used to their strings and filter on something like that. If we return a StringType, we would face a problem of getting indeterminate collation failing to keep the pass through for our functions. This is more of a problem if users set default collation to be something else, so we might say that changing return type to default collation would be the better choice? -- 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