miland-db commented on code in PR #45643:
URL: https://github.com/apache/spark/pull/45643#discussion_r1537403212
##########
sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala:
##########
@@ -70,6 +74,152 @@ class CollationStringExpressionsSuite extends QueryTest
with SharedSparkSession
})
}
+ test("INSTR check result on non-explicit default collation") {
+ checkEvaluation(StringInstr(Literal("aAads"), Literal("Aa")), 2)
+ }
+
+ test("INSTR check result on explicitly collated strings") {
+ // UTF8_BINARY_LCASE
+ checkEvaluation(StringInstr(Literal.create("aaads", StringType(1)),
+ Literal.create("Aa", StringType(1))), 1)
+ checkEvaluation(StringInstr(Collate(Literal("aaads"), "UTF8_BINARY_LCASE"),
Review Comment:
Ok, I will update the code
--
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]