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

Julian Hyde commented on CALCITE-6500:
--------------------------------------

Ah, I see you already did it. Thank you. (I'd use {{noformat}} rather than 
{{code}} for the error stack.)

> Aggregation inside Window clause nodes fails when the query is written with a 
> different syntax
> ----------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6500
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6500
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Sree Charan Manamala
>            Priority: Minor
>
> A query like
> {code:java}
> SELECT
> row_number() over (partition by aggr(col1) order by col2) as c
> FROM table
> {code}
> works fine.
> where as the query when written as
> {code:java}
> SELECT
> row_number() over w as c
> FROM table
> WINDOW w as (partition by aggr(col1) order by col2)
> {code}
> throws
>  
> {code:java}
> agg.lookupAggregates for call aggr(`table`.`col1`))
> java.lang.NullPointerException
>  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to