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

Fix nested CTE substitution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL

    Description

      The following nested CTE should result empty result instead of 1

      WITH t(c) AS (SELECT 1)
      SELECT * FROM t
      WHERE c IN (
        WITH t(c) AS (SELECT 2)
        SELECT * FROM t
      )
      

      Attachments

        Activity

          People

            petertoth Peter Toth
            petertoth Peter Toth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: