Closed mushroom0V0 closed 4 months ago
Maybe I should try the latest version and see the results
Yes, you can try the latest 5.2.0 version. This version has do a great enhancement in sql parse.
😂Since there are many projects affected, is there any way not to upgrade the version and fix the error
bingo!
change
select file_store_id, extension, count(*) count, sum(IFNULL(file_size,0)) size from file f
to
select file_store_id, extension, count(*) as count, sum(COALESCE(file_size,0)) as size from file f
it works!!!!!
The version is out of service, please try new version.
您的邮件已收到,谢谢~ Best wishes to you~!!
Bug Report
Which version of ShardingSphere did you use?
version 4.0.1 & 4.1.1 has been tried
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
return query results
Actual behavior
√:select file_store_id, extension from file f -- query
file_01
,file_02
,.... normally ×:select file_store_id, extension, count(*) count, sum(IFNULL(file_size,0)) size from file f -- only queryfile
When the statement contains no aggregate function, it can work normally; When the aggregate function is included, the following error is prompted:
Reason analyze (If you can)
it looks like org.apache.shardingsphere.sql.parser.core.SQLParseKernel#parse() Failed to resolve a TableReferences type element when the statement contains aggregate function.