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

jiaan.geng commented on SPARK-28506:
------------------------------------

I runed the similar sql show below:

{code:java}
SELECT
    rank() OVER (ORDER BY salary),
    count(*)
FROM
    basic_pays
GROUP BY 1
> ERROR:  window functions are not allowed in GROUP BY
  LINE 2:     rank() OVER (ORDER BY salary),
              ^
  
> Time: 0.011s
{code}
It seems isn't consistent with your description.


> not handling usage of group function and window function at some conditions
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-28506
>                 URL: https://issues.apache.org/jira/browse/SPARK-28506
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: Dylan Guedes
>            Priority: Major
>
> Hi,
> looks like SparkSQL is not able to handle this query:
> {code:sql}SELECT rank() OVER (ORDER BY 1), count(*) FROM empsalary GROUP BY 
> 1;{code}
> PgSQL, on the other hand, does.



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

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

Reply via email to