XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      PostgreSQL handles nested WITHs in a different way then Spark does currently. These queries retunes 1 in Spark while they return 2 in PostgreSQL:

      WITH
        t AS (SELECT 1),
        t2 AS (
          WITH t AS (SELECT 2)
          SELECT * FROM t
        )
      SELECT * FROM t2
      
      WITH t AS (SELECT 1)
      SELECT (
        WITH t 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: