uros-db commented on code in PR #46040:
URL: https://github.com/apache/spark/pull/46040#discussion_r1571028944
##########
sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala:
##########
@@ -425,6 +425,54 @@ class CollationStringExpressionsSuite
})
}
+ test("Support Left/Right/Substr with collation") {
+ case class SubstringTestCase(
+ method: String,
+ str: String,
+ len: String,
+ pad: Option[String],
+ collation: String,
+ result: Row) {
+ val strString = if (str == "null") "null" else s"'$str'"
+ val query =
+ s"SELECT $method(collate($strString, '$collation'), $len${pad.map(p =>
s", '$p'").getOrElse("")})" // scalastyle:ignore line.size.limit
Review Comment:
it's alright to break a row
we shouldn't normally use // scalastyle:ignore line.size.limit
--
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]