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

Add support for IS [NOT] DISTINCT FROM to SPARK SQL

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Add support for the SQL standard distinct predicate to SPARK SQL.

      <expression> IS [NOT] DISTINCT FROM <expression>
      
      data = [(10, 20), (30, 30), (40, None), (None, None)]
      df = sc.parallelize(data).toDF(["c1", "c2"])
      df.createTempView("df")
      spark.sql("select c1, c2 from df where c1 is not distinct from c2").collect()
      [Row(c1=30, c2=30), Row(c1=None, c2=None)]
      

        Attachments

          Activity

            People

            • Assignee:
              ptkool Michael Styles
              Reporter:
              ptkool Michael Styles
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: