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

Julian Hyde resolved CALCITE-1238.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.8.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/0d2eae5b. Thanks 
for the PR, [~ebastien]!

> Unparsing LIMIT without ORDER BY generates invalid SQL after validation
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-1238
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1238
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.7.0
>            Reporter: Emmanuel Bastien
>            Assignee: Emmanuel Bastien
>             Fix For: 1.8.0
>
>
> The context of the problem is the validation of queries with a LIMIT clause 
> but no ORDER BY, e.g. "SELECT c FROM t LIMIT 2".
> The problem does not show up at parsing time but when running a validator. 
> The generated AST includes an ORDER BY operand with an empty column list.
> When building a SQL query out of the validated AST, an ORDER BY clause is 
> inserted before the LIMIT/FETCH clause, e.g "SELECT c FROM t ORDER BY LIMIT 
> 2". This SQL query is not valid.



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

Reply via email to