You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "angerszhu (Jira)" <ji...@apache.org> on 2021/04/08 06:07:00 UTC

[jira] [Updated] (SPARK-34986) Aggregate ordinal should judge is it contains agg function

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

angerszhu updated SPARK-34986:
------------------------------
    Description: 
Aggregate ordinal should judge is it contains agg function.

before this change it's 
```

-- !query
select a, b, sum(b) from data group by 3
-- !query schema
struct<>
-- !query output
org.apache.spark.sql.AnalysisException
aggregate functions are not allowed in GROUP BY, but found sum(data.b)

```

  was:Aggregate ordinal should judge is it contains agg function.


> Aggregate ordinal should judge is it contains agg function
> ----------------------------------------------------------
>
>                 Key: SPARK-34986
>                 URL: https://issues.apache.org/jira/browse/SPARK-34986
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.2.0
>            Reporter: angerszhu
>            Priority: Major
>
> Aggregate ordinal should judge is it contains agg function.
> before this change it's 
> ```
> -- !query
> select a, b, sum(b) from data group by 3
> -- !query schema
> struct<>
> -- !query output
> org.apache.spark.sql.AnalysisException
> aggregate functions are not allowed in GROUP BY, but found sum(data.b)
> ```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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