You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:37:29 UTC

[jira] [Resolved] (SPARK-13720) SQLBuilder.toSQL is broken when there is a sort by after having

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

Hyukjin Kwon resolved SPARK-13720.
----------------------------------
    Resolution: Incomplete

> SQLBuilder.toSQL is broken when there is a sort by after having
> ---------------------------------------------------------------
>
>                 Key: SPARK-13720
>                 URL: https://issues.apache.org/jira/browse/SPARK-13720
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Wenchen Fan
>            Priority: Major
>              Labels: bulk-closed
>
> parse this SQL "SELECT COUNT(value) FROM parquet_t1 GROUP BY key HAVING MAX(key) > 0 SORT BY key" to logical plan and generate SQL string again, the generated SQL string can't be parsed.
> This is because, we will add extra `SubqueryAlias` while converting logical plan to SQL string(the `RecoverScopingInfo` rule in SQLBuilder). However, we only update qualifiers in the `Project` operator that just above the added `SubqueryAlias`, logically we also need to update qualifiers in all ancestor plans. For example, if there is a Project under a Sort, if we add `SubqueryAlias` under Project, we need update qualifiers for Sort too.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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