uros-db commented on code in PR #46461:
URL: https://github.com/apache/spark/pull/46461#discussion_r1598044065


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala:
##########
@@ -84,7 +85,7 @@ case class RaiseError(errorClass: Expression, errorParms: 
Expression, dataType:
   override def foldable: Boolean = false
   override def nullable: Boolean = true
   override def inputTypes: Seq[AbstractDataType] =
-    Seq(StringType, MapType(StringType, StringType))
+    Seq(StringTypeAnyCollation, MapType(StringType, StringType))

Review Comment:
   Note here: this particular expression cannot be used with the second 
parameter (`MapType(StringType, StringType)`), as it specifically doesn't allow 
passing that expression when constructing `RaiseError`
   
   as per the current Spark expression API, user can only specify the first 
parameter, while the second one is only reserved for internal Spark use (where 
it's always passed as Literal with `StringType(0)`)
   
   hence, there's no need to use something like 
`AbstractMapType(StringTypeAnyCollation, StringTypeAnyCollation)` 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: 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

Reply via email to