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

'SELECT 1 / NULL` throws AnalysisException, while 'SELECT 1 * NULL` works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.1, 2.1.0
    • SQL
    • None

    Description

      Running SELECT 1 / NULL fails with

      org.apache.spark.sql.AnalysisException: cannot resolve '(1 / NULL)' due to data type mismatch: differing types in '(1 / NULL)' (int and null).
      

      but SELECT 1 * NULL returns NULL, as expected.

      Attachments

        Activity

          People

            petermaxlee Peter Lee
            joshrosen Josh Rosen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: