Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-34233

NPE for char padding in binary comparison

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 3.1.1
    • 3.1.1
    • SQL
    • None

    Description

      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),
      ("c1 = null", false)))
      }
      }

      the red one will raise NPE

      Attachments

        Activity

          People

            Qin Yao Kent Yao 2
            Qin Yao Kent Yao 2
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: