stefankandic commented on code in PR #47502:
URL: https://github.com/apache/spark/pull/47502#discussion_r1694712548
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HashExpressionsSuite.scala:
##########
@@ -620,6 +620,29 @@ class HashExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
checkHiveHashForDecimal("123456.123456789012345678901234567890", 38, 31,
1728235666)
}
+ for (collation <- Seq("UTF8_LCASE", "UNICODE_CI", "UTF8_BINARY")) {
+ test(s"hash equality for collated $collation strings") {
+ val s1 = "aaa"
+ val s2 = "AAA"
+
+ if (CollationFactory.fetchCollation(collation).supportsBinaryEquality) {
+ // Calculate interpreted hash values for s1 and s2
+ val interpretedHash1 = Murmur3Hash(Seq(Collate(Literal(s1),
collation)), 42).eval()
Review Comment:
right now we are just checking this for the interpreted path, could we do
something else instead like call `checkEvaluation` for both with the expected
hash value?
--
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]