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

Null handling in BooleanSimplification

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2.2, 2.3.1
    • Fix Version/s: 2.2.3, 2.3.2, 2.4.0
    • Component/s: SQL
    • Labels:
      None

      Description

      SPARK-20350 introduced a bug BooleanSimplification for null handling. For example, the following case returns a wrong answer.

          val schema = StructType.fromDDL("a boolean, b int")
          val rows = Seq(Row(null, 1))
      
          val rdd = sparkContext.parallelize(rows)
          val df = spark.createDataFrame(rdd, schema)
      
          checkAnswer(df.where("(NOT a) OR a"), Seq.empty)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                smilegator Xiao Li
                Reporter:
                smilegator Xiao Li
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: