You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yerui Sun (JIRA)" <ji...@apache.org> on 2016/11/28 10:49:59 UTC

[jira] [Resolved] (SPARK-18577) Ambiguous reference with duplicate column names in aggregate

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

Yerui Sun resolved SPARK-18577.
-------------------------------
    Resolution: Won't Fix

It's indeed not standard sql usage,only supported in Hive, but not MySQL, postgresql, presto, won't fix in Spark.

> Ambiguous reference with duplicate column names in aggregate
> ------------------------------------------------------------
>
>                 Key: SPARK-18577
>                 URL: https://issues.apache.org/jira/browse/SPARK-18577
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.2
>            Reporter: Yerui Sun
>
> Assuming we have a table 't' with 3 columns 'id', 'name' and 'rank', and here's the sql to re-produce issue:
> {code}
> select id, count(*) from t t1 join t t2 on t1.name = t2.name group by t1.id
> {code}
> The error message is:
> {code}
> Reference 'id' is ambiguous, could be: id#3, id#9.; line 1 pos 7
> {code}
> The sql can be parsed in Hive, since the select 'id' reference can be resolved to 't1.id', which presented in group expressions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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