uros-db commented on code in PR #46404:
URL: https://github.com/apache/spark/pull/46404#discussion_r1592820188
##########
sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala:
##########
@@ -800,6 +804,61 @@ class CollationStringExpressionsSuite
assert(collationMismatch.getErrorClass === "COLLATION_MISMATCH.EXPLICIT")
}
+ test("Support mode for string expression with collation") {
+ val query = "SELECT mode(collate('abc', 'utf8_binary'))"
+ checkAnswer(sql(query), Row("abc"))
+
assert(sql(query).schema.fields.head.dataType.sameType(StringType("utf8_binary")))
+ }
Review Comment:
you can remove this test, as it doesn't seem to do anything - i.e. we
already know that mode supports regular strings (UTF8_BINARY)
--
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]