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

Khurram Faraaz commented on DRILL-6175:
---------------------------------------

This issue is a duplicate of https://issues.apache.org/jira/browse/DRILL-4807

> Windowing functions don't allow aggregates in over clause (incorrectly)
> -----------------------------------------------------------------------
>
>                 Key: DRILL-6175
>                 URL: https://issues.apache.org/jira/browse/DRILL-6175
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>    Affects Versions: 1.12.0
>            Reporter: Chris
>            Priority: Minor
>
> Windowing functions should allow aggregate functions in the over() clause, 
> but do not.
> This query:
> select pay_period, sum(money) as sum_money
>  , rank() over(order by sum(money)) as rnk
> from (values (1,200), (1,40), (2,30), (2, 239), (3,1)) base(pay_period, money)
> group by pay_period
> should work, but does not, and returns this error:
> SYSTEM ERROR: AssertionError: Internal error: invariant violated: conversion 
> result not null
> [Error Id: 8df6f6f1-41af-42b3-95d5-b2117b49bec5 on <host>:31010]
> This should be allowed in standards, and doable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to