You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/15 05:28:33 UTC

[GitHub] [shardingsphere] wgy8283335 opened a new issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

wgy8283335 opened a new issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668


   ## Bug Report
   
   ORACLE SQL 'IDENTIFIER_'  rule is not correct in Literals.g4
   
   ### Which version of ShardingSphere did you use?
   5.0.0-RC1-SNAPSHOT
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   shardingsphere-sql-parser
   ### Expected 
   IDENTIFIER_:[A-Za-z_$0-9]*?[A-Za-z_$]+?[A-Za-z_$0-9]*;
   ### Actual 
   IDENTIFIER_:[A-Za-z]+[A-Za-z_$#0-9]*;
   
   @Liangda-w 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] Liangda-w commented on issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

Posted by GitBox <gi...@apache.org>.
Liangda-w commented on issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668#issuecomment-799249003


   Hi @wgy8283335, 
   Your suggestion won't work properly, because if you put `PASSWORD_` before `IDENTIFIER_`, many words like for example `abc123` will be assigned `PASSWORD_` first instead of `IDENTIFIER_`, which breaks the rule for other SQL 🤔 
   
   An example with `PASSWORD_`:
   ![parseTree](https://user-images.githubusercontent.com/66914151/111127913-9eb08080-8574-11eb-8bc5-f45d284942a8.png)
   
   Why do you think `[A-Za-z_$0-9]*?[A-Za-z_$]+?[A-Za-z_$0-9]` is necessary? According to the [Oracle Database Object Naming Rules](https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Database-Object-Names-and-Qualifiers.html#GUID-75337742-67FD-4EC0-985F-741C93D918DA), I think the current `IDENTIFIER_` rule is more accurate.
   
   > Nonquoted identifiers must begin with an alphabetic character from your database character set. Quoted identifiers can begin with any character.
   
   Please correct me if I'm thinking wrong:) Maybe we could also use the previous `IDENTIFIER_` for `password` to solve this issue.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] wgy8283335 edited a comment on issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

Posted by GitBox <gi...@apache.org>.
wgy8283335 edited a comment on issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668#issuecomment-799114124


   @Liangda-w 
   The bug is introduced by  "[SQL Definition Collation][Oracle]Collate the SQL definition of SET ROLE #9603".
   ![image](https://user-images.githubusercontent.com/22066046/111107817-8baca900-8592-11eb-9e08-9e07b84a552d.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] wgy8283335 closed issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

Posted by GitBox <gi...@apache.org>.
wgy8283335 closed issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] wgy8283335 commented on issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

Posted by GitBox <gi...@apache.org>.
wgy8283335 commented on issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668#issuecomment-799114124


   @Liangda-w 
   [SQL Definition Collation][Oracle]Collate the SQL definition of SET ROLE #9603
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] wgy8283335 commented on issue #9668: ORACLE SQL 'IDENTIFIER_' rule is not correct in Literals.g4

Posted by GitBox <gi...@apache.org>.
wgy8283335 commented on issue #9668:
URL: https://github.com/apache/shardingsphere/issues/9668#issuecomment-800824016


   Good, I agree with you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org