You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2019/07/12 14:22:00 UTC

[jira] [Resolved] (SPARK-28228) Fix substitution order of nested WITH clauses

     [ https://issues.apache.org/jira/browse/SPARK-28228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun resolved SPARK-28228.
-----------------------------------
       Resolution: Fixed
         Assignee: Peter Toth
    Fix Version/s: 3.0.0

This is resolved via https://github.com/apache/spark/pull/25029

> Fix substitution order of nested WITH clauses
> ---------------------------------------------
>
>                 Key: SPARK-28228
>                 URL: https://issues.apache.org/jira/browse/SPARK-28228
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Peter Toth
>            Assignee: Peter Toth
>            Priority: Major
>             Fix For: 3.0.0
>
>
> PostgreSQL handles nested WITHs in a different way then Spark does currently. These queries retunes 1 in Spark while they return 2 in PostgreSQL:
> {noformat}
> WITH
>   t AS (SELECT 1),
>   t2 AS (
>     WITH t AS (SELECT 2)
>     SELECT * FROM t
>   )
> SELECT * FROM t2
> {noformat}
> {noformat}
> WITH t AS (SELECT 1)
> SELECT (
>   WITH t AS (SELECT 2)
>   SELECT * FROM t
> )
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org