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

Sean Hsuan-Yi Chu commented on CALCITE-802:
-------------------------------------------

Would it be more reasonable to throw exception at parsing? 

In the same way as if somebody puts Over in where-clause:
For example,
{code}
select empno 
from over(partition by deptno order by empno)
{code}

{code}
org.apache.calcite.sql.parser.SqlParseException: Encountered "over" at line 2, 
column 6.
Was expecting one of:
    <IDENTIFIER> ...
    <QUOTED_IDENTIFIER> ...
    <BACK_QUOTED_IDENTIFIER> ...
    <BRACKET_QUOTED_IDENTIFIER> ...
    <UNICODE_QUOTED_IDENTIFIER> ...
{code} 

> OVER clause in Order-By should be blocked at validation
> -------------------------------------------------------
>
>                 Key: CALCITE-802
>                 URL: https://issues.apache.org/jira/browse/CALCITE-802
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> We found a similar issue to Calcite-800. An example is as below:
> select empno, rank() over(partition by deptno order by empno)
> from emp
> order by row_number() over(partition by deptno order by empno)
> Order by should not contain OVER.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to