Re: [PR] [SPARK-48162][SQL] Add collation support for MISC expressions [spark]

2024-05-15 Thread via GitHub


cloud-fan closed pull request #46461: [SPARK-48162][SQL] Add collation support 
for MISC expressions
URL: https://github.com/apache/spark/pull/46461


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



Re: [PR] [SPARK-48162][SQL] Add collation support for MISC expressions [spark]

2024-05-15 Thread via GitHub


cloud-fan commented on PR #46461:
URL: https://github.com/apache/spark/pull/46461#issuecomment-2111673996

   thanks, merging to master!


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



Re: [PR] [SPARK-48162][SQL] Add collation support for MISC expressions [spark]

2024-05-13 Thread via GitHub


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



Re: [PR] [SPARK-48162][SQL] Add collation support for MISC expressions [spark]

2024-05-08 Thread via GitHub


dongjoon-hyun commented on PR #46461:
URL: https://github.com/apache/spark/pull/46461#issuecomment-2100919314

   Could you take a look at the UT failures?
   ```
   [info] *** 14 TESTS FAILED ***
   [error] Failed tests:
   [error]  org.apache.spark.sql.connect.planner.SparkConnectServiceSuite
   [error]  org.apache.spark.sql.connect.ProtoToParsedPlanTestSuite
   ```


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