You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "hahayuan (JIRA)" <ji...@apache.org> on 2017/12/27 16:10:00 UTC

[jira] [Updated] (KYLIN-3135) regular expression of multi line comment pattern was wrong

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

hahayuan updated KYLIN-3135:
----------------------------
    Description: 
Hi,all.
Recently,I was testing query function of kylin,
sometimes I just comment with /**/ instead of delete the sql,cause I need to query and compare again.
And I was confused that the results says it was "No Support Sql",but it can query success without comments.
For example,
/*
select count(\*) from kylin_sales;
*/
select * from kylin_sales;
So I view the code and find the commentPatterns of /*\*/ was "/\\\*[^\\*/]*",clearly it was wrong.
The regular expression of [abc] means any character in abc,such as a or b.
So the [^\\*/] means that * or / can't appear,
But under this circumstances the */ need to be as a string not separated character.
the */ can't appear not * or / can't appear.
I rewrite the regular expression,"/\\*[\\s\\S]*?\\\*/",if you think it's necessary,you can review and replace it.

  was:
Hi,all.
Recently,I was testing query function of kylin,
sometimes I just comment with /**/ instead of delete the sql,cause I need to query and compare again.
And I was confused that the results says it was "No Support Sql",but it can query success without comments.
For example,
/*
select count(*) from kylin_sales;
*/
select * from kylin_sales;
So I view the code and find the commentPatterns of /**/ was "/\\*[^\\*/]*",clearly it was wrong.
The regular expression of [abc] means any character in abc,such as a or b.
So the [^\\*/] means that * or / can't appear,
But under this circumstances the */ need to be as a string not separated character.
the */ can't appear not * or / can't appear.
I rewrite the regular expression,"/\\*[\\s\\S]*?\\*/",if you think it's necessary,you can review and replace it.


> regular expression of multi line comment pattern was wrong
> ----------------------------------------------------------
>
>                 Key: KYLIN-3135
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3135
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: hahayuan
>
> Hi,all.
> Recently,I was testing query function of kylin,
> sometimes I just comment with /**/ instead of delete the sql,cause I need to query and compare again.
> And I was confused that the results says it was "No Support Sql",but it can query success without comments.
> For example,
> /*
> select count(\*) from kylin_sales;
> */
> select * from kylin_sales;
> So I view the code and find the commentPatterns of /*\*/ was "/\\\*[^\\*/]*",clearly it was wrong.
> The regular expression of [abc] means any character in abc,such as a or b.
> So the [^\\*/] means that * or / can't appear,
> But under this circumstances the */ need to be as a string not separated character.
> the */ can't appear not * or / can't appear.
> I rewrite the regular expression,"/\\*[\\s\\S]*?\\\*/",if you think it's necessary,you can review and replace it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)