You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute the following sql. select field_1, field_2, count(1) from table_1 where field_1 in (xxxx, xxxxx) group by field_1
When no data row meets the condition, null should be returned, but the row with data 0 is returned.
Which version of ShardingSphere did you use?
ShardingSphere-JDBC 5.5.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC 5.5.0
Expected behavior
Return empty
Actual behavior
Return 0
Reason analyze (If you can)
In this issue: #4680, the bug where count returns null is fixed. However, when goupby exists in sql, null should be returned instead of 0.
In line 157, count is assigned a value, causing all SQL statements containing count to return one row of data.
Bug Report
Execute the following sql.
select field_1, field_2, count(1) from table_1 where field_1 in (xxxx, xxxxx) group by field_1
When no data row meets the condition, null should be returned, but the row with data 0 is returned.
Which version of ShardingSphere did you use?
ShardingSphere-JDBC 5.5.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC 5.5.0
Expected behavior
Return empty
Actual behavior
Return 0
Reason analyze (If you can)
In this issue: #4680, the bug where count returns null is fixed. However, when goupby exists in sql, null should be returned instead of 0.
In line 157, count is assigned a value, causing all SQL statements containing count to return one row of data.
shardingsphere/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/merge/dql/groupby/GroupByMemoryMergedResult.java
Lines 142 to 162 in fc0a225
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
select field_1, field_2, count(1) from table_1 where field_1 in (xxxx, xxxxx) group by field_1
The text was updated successfully, but these errors were encountered: