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/07/29 03:07:58 UTC

[GitHub] [shardingsphere] gywndi opened a new issue #11566: rsMeta.getColumnCount() returns "0", If I query the entire sharding table for GROUPING result.

gywndi opened a new issue #11566:
URL: https://github.com/apache/shardingsphere/issues/11566


   ## Bug Report
   
   "user" is sharding table and sharding key is "userid". 
   ```sql
   select * from (
     select name, count(*) from user where crc32(name) % 2 = 0 group by name
     union all
     select name, count(*) from user where crc32(name) % 2 = 1 group by name
   ) x
   ```
   
   When executing the above kind of query, the rsMeta.getColumnCount() result is 0. I implemented a simple logic to drop the query result into JSON and tested it.
   
   ### Which version of ShardingSphere did you use?
   4.1.1
   
   ### Which project did you use? 
   ShardingSphere-JDBC
   
   ### Expected behavior
   ```json
   {"rowCount":3,"rows":[{"name":"abcde-name0","count(*)":"1"},{"name":"abcde-name1","count(*)":"1"},{"name":"abcde-name2","count(*)":"1"}]}%  
   ```
   
   ### Actual behavior
   ```json
   {"rowCount":3,"rows":[{},{},{}]}%  
   ```
   
   ### Reason analyze (If you can)
   
   ### 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).
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu commented on issue #11566: rsMeta.getColumnCount() returns "0", If I query the entire sharding table for GROUPING result.

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


   Can not support subquery in 4.x, please update to version 5.x and try again


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu closed issue #11566: rsMeta.getColumnCount() returns "0", If I query the entire sharding table for GROUPING result.

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


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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