You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/04/19 17:37:00 UTC

[jira] [Commented] (SPARK-38951) Aggregate aliases override field names in ResolveAggregateFunctions

    [ https://issues.apache.org/jira/browse/SPARK-38951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17524460#comment-17524460 ] 

Apache Spark commented on SPARK-38951:
--------------------------------------

User 'cxzl25' has created a pull request for this issue:
https://github.com/apache/spark/pull/36265

> 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
>
> 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
(v8.20.7#820007)

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