cloud-fan commented on code in PR #34900:
URL: https://github.com/apache/spark/pull/34900#discussion_r845086292
##########
sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala:
##########
@@ -100,6 +100,17 @@ trait CharVarcharTestSuite extends QueryTest with
SQLTestUtils {
}
}
+ test("char type values should not be padded when charVarcharAsString is
true") {
+ withSQLConf(SQLConf.LEGACY_CHAR_VARCHAR_AS_STRING.key -> "true") {
+ withTable("t") {
+ sql(s"CREATE TABLE t(a STRING, c CHAR(5)) USING $format partitioned by
(c)")
+ sql("INSERT INTO t VALUES ('abc', 'abc')")
+ checkAnswer(sql("SELECT c FROM t WHERE c='abc'"), Row("abc"))
+ checkAnswer(sql("SELECT c FROM t WHERE c in ('abc')"), Row("abc"))
Review Comment:
let's test both data and partition predicates.
--
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]