cloud-fan commented on code in PR #53643:
URL: https://github.com/apache/spark/pull/53643#discussion_r2652758112
##########
sql/core/src/test/scala/org/apache/spark/sql/collation/DefaultCollationTestSuite.scala:
##########
@@ -46,30 +54,49 @@ abstract class DefaultCollationTestSuite extends QueryTest
with SharedSparkSessi
"version()", "space(5)", "randstr(5, 123)"
)
- def dataSource: String = "parquet"
+ protected val charVarcharLength: Int = 10
+
+ def testCatalog: String = SESSION_CATALOG_NAME
def testSchema: String = "test_schema"
- def testTable: String = "test_tbl"
+ def testTable1: String = "test_tbl1"
+ def testTable2: String = "test_tbl2"
def testView: String = "test_view"
protected val fullyQualifiedPrefix =
s"${CollationFactory.CATALOG}.${CollationFactory.SCHEMA}."
- protected val schemaAndObjectCollationPairs =
+ protected def schemaAndObjectCollationPairs: Seq[(String, Option[String])] =
Seq(
// (schemaDefaultCollation, objectDefaultCollation)
("UTF8_BINARY", None),
("UTF8_LCASE", None),
("UNICODE", None),
- ("DE", None),
+ ("de", None),
("UTF8_BINARY", Some("UTF8_BINARY")),
("UTF8_BINARY", Some("UTF8_LCASE")),
- ("UTF8_BINARY", Some("DE")),
+ ("UTF8_BINARY", Some("de")),
("UTF8_LCASE", Some("UTF8_BINARY")),
("UTF8_LCASE", Some("UTF8_LCASE")),
- ("UTF8_LCASE", Some("DE")),
- ("DE", Some("UTF8_BINARY")),
- ("DE", Some("UTF8_LCASE")),
- ("DE", Some("DE"))
+ ("UTF8_LCASE", Some("de")),
+ ("de", Some("UTF8_BINARY")),
+ ("de", Some("UTF8_LCASE")),
+ ("de", Some("de"))
)
+
+ // This is used for tests that don't depend on explicitly specifying the
data type
+ // (these tests still test the string type), or ones that are not applicable
to char/varchar
+ // types. E.g., UDFs don't support char/varchar as input parameters/return
types.
Review Comment:
```suggestion
// types.
```
--
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]