alexchengyj opened a new issue #13587:
URL: https://github.com/apache/shardingsphere/issues/13587


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.0.0
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   **SELECT t.id as id, t.name, t.age FROM table1 t ORDER BY t.id DESC;**
   **Return correct results**
   ### Actual behavior
   **SELECT t.id as id, t.name, t.age FROM table1 t ORDER BY t.id DESC;**
   Exception in thread "main" 
org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an 
error in your SQL syntax
        at 
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.twoPhaseParse(SQLParserExecutor.java:68)
        at 
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.parse(SQLParserExecutor.java:49)
        at 
org.apache.shardingsphere.sql.parser.api.SQLParserEngine.parse(SQLParserEngine.java:51)
        at 
org.apache.shardingsphere.example.parser.oracle.statement.OracleParserStatementExample.lambda$main$0(OracleParserStatementExample.java:56)
        at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
        at 
org.apache.shardingsphere.example.parser.oracle.statement.OracleParserStatementExample.main(OracleParserStatementExample.java:53)
   
   ### Reason analyze (If you can)
   SELECT t.id as id, t.name, t.age FROM table1 t ORDER BY t.id DESC;  Return 
error
   
   SELECT t.id AS id, t.name, t.age FROM table1 t ORDER BY t.id DESC; Return 
correct results
   
   Antlr parse
   
![QQ截图20211113171036](https://user-images.githubusercontent.com/14285483/141613202-0d8cd6ca-a0c6-4be9-87e9-73267287af55.jpg)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   OracleParserStatementExample in shardingsphere-parser-example 5.0.0


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to