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

Exists should not be evaluated in Join operator and can be converted to ScalarSubquery if no correlated reference

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • SQL
    • None

    Description

      Similar to ListQuery, Exists should not be evaluated in Join operator too. Otherwise, a query like following will fail:

      sql("select * from l, r where l.a = r.c + 1 AND (exists (select * from r) OR l.a = r.c)")

      For the Exists subquery without correlated reference, this patch converts it to scalar subquery with a count Aggregate operator.

      Attachments

        Activity

          People

            viirya L. C. Hsieh
            viirya L. C. Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: