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

SQLBuilder should not raise exceptions on EXISTS queries

    XMLWordPrintableJSON

Details

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

    Description

      Currently, `SQLBuilder` raises `empty.reduceLeft` exceptions on *unoptimized* `EXISTS` queries. We had better prevent this.

      scala> sql("CREATE TABLE t1(a int)")
      scala> val df = sql("select * from t1 b where exists (select * from t1 a)")
      scala> new org.apache.spark.sql.catalyst.SQLBuilder(df).toSQL
      java.lang.UnsupportedOperationException: empty.reduceLeft
      

      Attachments

        Activity

          People

            dongjoon Dongjoon Hyun
            dongjoon Dongjoon Hyun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: