You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2021/05/28 15:11:00 UTC

[jira] [Reopened] (CALCITE-4474) SqlSimpleParser inner Tokenizer should not recognize the sql of TokenType.ID or some keywords in some case

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

Stamatis Zampetakis reopened CALCITE-4474:
------------------------------------------

> SqlSimpleParser inner Tokenizer should not recognize the sql of TokenType.ID or some keywords in some case
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4474
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4474
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: wangjie
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.26.0
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> in SqlSimpleParser.Tokenizer#nextToken() lines 401 - 423, is used to recognize the sql of TokenType.ID or some keywords. 
> If a certain segment of characters is continuously composed of Token,the function of this code may be wrong.
>  
> E.g :
>  (1)select * from a where price> 10.0\-–comment
> 【10.0\-–comment】should be recognize as TokenType.ID("10.0") and TokenType.COMMENT, but it recognize as TokenType.ID("10.0--comment")
>  (2)select * from a where column_b='/* this is not comment */'
> 【/\* this is not comment \*/】should be recognize as TokenType.SQID("/\* this is not comment \*/"), but it was not
>   
> you can see reproduce-demo in [https://github.com/wangjie-fourth/calcite-reproduce]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)