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

Incorrect result due to invalid pushdown of data-independent filter beneath aggregate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.6.2, 2.0.0, 2.0.2
    • 2.0.2, 2.1.0
    • SQL

    Description

      Let diamonds be a non-empty table. The following two queries should both return no rows, but the first returns a single row:

      SELECT
      1
      FROM (
          SELECT
          count(*)
          FROM diamonds
      ) t1
      WHERE
      false
      
      SELECT
      1
      FROM (
          SELECT
          *
          FROM diamonds
      ) t1
      WHERE
      false
      

      Attachments

        Activity

          People

            joshrosen Josh Rosen
            joshrosen Josh Rosen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: