Details
-
Bug
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.1.0, 3.1.1, 3.2.0
Description
This ticket aim at fixing the bug that does not apply right-padding for char types inside correlated subquries.
For example, a query below returns nothing in master, but a correct result is `c`.
scala> sql(s"CREATE TABLE t1(v VARCHAR(3), c CHAR(5)) USING parquet") scala> sql(s"CREATE TABLE t2(v VARCHAR(5), c CHAR(7)) USING parquet") scala> sql("INSERT INTO t1 VALUES ('c', 'b')") scala> sql("INSERT INTO t2 VALUES ('a', 'b')") scala> val df = sql(""" |SELECT v FROM t1 |WHERE 'a' IN (SELECT v FROM t2 WHERE t2.c = t1.c )""".stripMargin) scala> df.show() +---+ | v| +---+ +---+
This is because `ApplyCharTypePadding` does not handle the case above to apply right-padding into `'abc'`.
Attachments
Issue Links
- is caused by
-
SPARK-33480 support char/varchar type
- Resolved
- links to