jovanpavl-db commented on code in PR #48222:
URL: https://github.com/apache/spark/pull/48222#discussion_r1777189899
##########
sql/core/src/test/scala/org/apache/spark/sql/CollationSuite.scala:
##########
@@ -44,27 +44,57 @@ class CollationSuite extends DatasourceV2SQLBase with
AdaptiveSparkPlanHelper {
private val allFileBasedDataSources = collationPreservingSources ++
collationNonPreservingSources
test("collate returns proper type") {
- Seq("utf8_binary", "utf8_lcase", "unicode", "unicode_ci").foreach {
collationName =>
+ Seq(
+ "utf8_binary",
+ "utf8_lcase",
+ "unicode",
+ "unicode_ci",
+ "unicode_ltrim_ci",
+ "utf8_lcase_trim",
+ "utf8_binary_rtrim"
+ ).foreach { collationName =>
checkAnswer(sql(s"select 'aaa' collate $collationName"), Row("aaa"))
val collationId = CollationFactory.collationNameToId(collationName)
- assert(sql(s"select 'aaa' collate $collationName").schema(0).dataType
- == StringType(collationId))
+ assert(
+ sql(s"select 'aaa' collate $collationName").schema(0).dataType
+ == StringType(collationId)
+ )
}
}
test("collation name is case insensitive") {
- Seq("uTf8_BiNaRy", "utf8_lcase", "uNicOde", "UNICODE_ci").foreach {
collationName =>
+ Seq(
+ "uTf8_BiNaRy",
+ "utf8_lcase",
+ "uNicOde",
+ "UNICODE_ci",
+ "uNiCoDE_ltRIm_cI",
Review Comment:
It can be anywhere, after ICU specifier (or UT8), so technically yes only
not on the first place.
--
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]