You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Hongze Zhang (JIRA)" <ji...@apache.org> on 2019/04/23 15:28:00 UTC

[jira] [Resolved] (CALCITE-2993) ParseException may be thrown for legal SQL queries due to incorrect "LOOKAHEAD(1)" hints

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

Hongze Zhang resolved CALCITE-2993.
-----------------------------------
    Resolution: Fixed

Fixed in [577e72cb95e5d4d88f187909c14d8691c266ac4c|https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=577e72cb95e5d4d88f187909c14d8691c266ac4c]. Thanks for the review, [~Chunwei Lei]!

> ParseException may be thrown for legal SQL queries due to incorrect "LOOKAHEAD(1)" hints
> ----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2993
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2993
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Hongze Zhang
>            Assignee: Hongze Zhang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.20.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> In some cases, ParseException is thrown incorrectly:
> Case 1
> {code:sql}
> select lead(x) ignore from t -- "ignore" aliases "lead(x)"
> {code}
> Case 2
> {code:sql}
> select *
>   from t match_recognize
>   (
>      after match skip to last -- "last" is a identifier. This is the implicit form of "skip to last last"
>     pattern (strt down+ up+)
>     define
>       down as down.price < PREV(down.price),
>       up as up.price > prev(up.price)
>   ) mr
> {code}
> Case 3
> {code:sql}
> select json_object(key: value) from t -- "key"/"value" are both column names.
> {code}
> And the failure on Case 1 is introduced by the fix of CALCITE-2847, Case 2/3 are not.



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