1a23-pangqiu opened a new issue, #25488: URL: https://github.com/apache/shardingsphere/issues/25488
## 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.3.2 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior sql correct ### Actual behavior sql error ### Reason analyze (If you can) SQLParsingException ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. Caused by: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax: select count(0) from (select test_plan_test_case.id as id, test_case.id as caseId, test_case.name, test_case.priority, test_case.type,test_case.test_id as testId,test_case.node_id, test_case.tags, test_case.maintainer, test_case.custom_fields,u.name as maintainerName,us.name as executorName, test_case.node_path, test_case.method, if(project.custom_num = 0, cast(test_case.num as char), test_case.custom_num) as customNum, test_plan_test_case.executor, test_plan_test_case.status, test_plan_test_case.actual_result,test_plan_test_case.execute_time as executeTime, test_plan_test_case.update_time, test_plan_test_case.`order`, test_plan_test_case.create_time,test_case_node.name as model, project.name as projectName, test_plan_test_case.plan_id as planId from test_plan_test_case inner join test_case on test_plan_test_case.case_id = test_case.id left join test_case_node on test_case_node.id = test_case.node_id inner join project on project.id = test_case.project_id left join user u on u.id = test_case.maintainer left join user us on us.id = test_plan_test_case.executor WHERE (test_case.status != 'Trash' or test_case.status is null) and test_plan_test_case.plan_id = ? order by test_plan_test_case.order desc) tmp_count, no viable alternative at input 'selectcount(0)from(selecttest_plan_test_case.idasid,test_case.idascaseId,test_case.name,test_case.priority,test_case.type,test_case.test_idastestId,test_case.node_id,test_case.tags,test_case.maintainer,test_case.custom_fields,u.nameasmaintainerName,us.nameasexecutorName,test_case.node_path,test_case.method,if(project.custom_num=0,cast(test_case.numaschar),test_case.custom_num)ascustomNum,test_plan_test_case.executor,test_plan_test_case.status,test_plan_test_case.actual_result,test_plan_test_case.execute_timeasexecuteTime,test_plan_test_case.update_time,test_plan_test_case.`order`,test_plan_test_case.create_time,test_case_node.nameasmodel,project.nameasprojectName,test_plan_test_case.plan_idasplanIdfromtest_plan_test_caseinnerjointest_caseontest_plan_test_case.case_id=test_case.idleftjointest_case_nodeontest_case_node.id=test_case.node_idinnerjoinprojectonproject.id=test_case.project_ idleftjoinuseruonu.id=test_case.maintainerleftjoinuserusonus.id=test_plan_test_case.executorWHERE(test_case.status!='Trash'ortest_case.statusisnull)andtest_plan_test_case.plan_id=?orderbytest_plan_test_case.order' at line 31, position 44, near [@228,1529:1533='order',<486>,31:44] 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:47) at org.apache.shardingsphere.sql.parser.api.SQLParserEngine.parse(SQLParserEngine.java:47) at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41) at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30) at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$2(LocalLoadingCache.java:141) at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2405) at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853) at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2403) at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2386) at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108) at com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:54) at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47) at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:58) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:205) at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:171) at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:87) at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:337) at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java) at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86) at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88) ... 170 common frames omitted ### Example codes for reproduce this issue (such as a github link). no viable alternative at input -- 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]
