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

ASF GitHub Bot updated SPARK-38951:
-----------------------------------
    Labels: pull-request-available  (was: )

> Aggregate aliases override field names in ResolveAggregateFunctions
> -------------------------------------------------------------------
>
>                 Key: SPARK-38951
>                 URL: https://issues.apache.org/jira/browse/SPARK-38951
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.2.1
>            Reporter: dzcxzl
>            Priority: Trivial
>              Labels: pull-request-available
>
> Spark versions before 3.1.x can query the following SQL:
> {code:java}
> select sum(id) as id  from range(10) group by id order by sum(id);{code}
> {code:java}
> Error in query: Resolved attribute(s) id#0L missing from id#1L in operator 
> !Aggregate [id#1L], [sum(id#1L) AS id#0L, sum(id#0L) AS sum(id#0L)#4L]. 
> Attribute(s) with the same name appear in the operation: id. Please check if 
> the right attribute(s) are used.;
> Project [id#0L]
> +- Sort [sum(id#0L)#4L ASC NULLS FIRST], true
>    +- !Aggregate [id#1L], [sum(id#1L) AS id#0L, sum(id#0L) AS sum(id#0L)#4L]
>       +- Range (0, 10, step=1, splits=None) {code}



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to