HyukjinKwon commented on code in PR #45819:
URL: https://github.com/apache/spark/pull/45819#discussion_r1548778507
##########
sql/core/src/test/scala/org/apache/spark/sql/CollationStringExpressionsSuite.scala:
##########
@@ -20,57 +20,60 @@ package org.apache.spark.sql
import scala.collection.immutable.Seq
import org.apache.spark.SparkConf
-import org.apache.spark.sql.catalyst.ExtendedAnalysisException
-import org.apache.spark.sql.catalyst.expressions.{Collation,
ExpressionEvalHelper, Literal, StringRepeat}
+import org.apache.spark.sql.catalyst.analysis.TypeCheckResult.DataTypeMismatch
+import org.apache.spark.sql.catalyst.expressions.{Collation, ConcatWs,
ExpressionEvalHelper, Literal, StringRepeat}
+import org.apache.spark.sql.catalyst.util.CollationFactory
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.test.SharedSparkSession
import org.apache.spark.sql.types.StringType
-class CollationStringExpressionsSuite extends QueryTest
- with SharedSparkSession with ExpressionEvalHelper {
+class CollationStringExpressionsSuite
+ extends QueryTest
+ with SharedSparkSession
+ with ExpressionEvalHelper {
case class CollationTestCase[R](s1: String, s2: String, collation: String,
expectedResult: R)
+
case class CollationTestFail[R](s1: String, s2: String, collation: String)
+
test("Support ConcatWs string expression with Collation") {
- // Supported collations
+ def prepareConcatWs(sep: String,
+ collation: String,
+ inputs: Any*): ConcatWs = {
Review Comment:
```suggestion
def prepareConcatWs(
sep: String,
collation: String,
inputs: Any*): ConcatWs = {
```
--
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]