You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/02/01 04:34:00 UTC

[jira] [Commented] (SPARK-34233) NPE for char padding in binary comparison

    [ https://issues.apache.org/jira/browse/SPARK-34233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17276049#comment-17276049 ] 

Apache Spark commented on SPARK-34233:
--------------------------------------

User 'yaooqinn' has created a pull request for this issue:
https://github.com/apache/spark/pull/31407

> NPE for char padding in binary comparison
> -----------------------------------------
>
>                 Key: SPARK-34233
>                 URL: https://issues.apache.org/jira/browse/SPARK-34233
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.1.0, 3.1.1
>            Reporter: Kent Yao
>            Assignee: Kent Yao
>            Priority: Major
>             Fix For: 3.2.0
>
>
> test("char type comparison: top-level columns") {
>     withTable("t") {
>       sql(s"CREATE TABLE t(c1 CHAR(2), c2 CHAR(5)) USING $format")
>       sql("INSERT INTO t VALUES ('a', 'a')")
>       testConditions(spark.table("t"), Seq(
>         ("c1 = 'a'", true),
>         ("'a' = c1", true),
>         ("c1 = 'a  '", true),
>         ("c1 > 'a'", false),
>         ("c1 IN ('a', 'b')", true),
>         ("c1 = c2", true),
>         ("c1 < c2", false),
>         ("c1 IN (c2)", true),
>        {color:red} ("c1 = null", false))){color}
>     }
>   }
> the red one will raise NPE



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org