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 2022/10/10 06:44:05 UTC

[GitHub] [shardingsphere] Superainbower opened a new issue, #11437: The result isn't right in Row to Column scenario

Superainbower opened a new issue, #11437:
URL: https://github.com/apache/shardingsphere/issues/11437

   ## Question
   
   **For English only**, other languages will not accept.
   
   Hi, i find the result isn't right in Row to Column scenario (shardingsphere jdbc 5.0.0-beta)
   
   Here is my data in mysql ( table sharding by begin_time)
   ![image](https://user-images.githubusercontent.com/35786966/126478735-1542d153-eac3-4bd7-86af-abfefb8fe929.png)
   
   SQL like this:
   
   select car_no,
   	   ifnull(sum( CASE WHEN type = '1' THEN cnt END ),0) AS type1,
   	   ifnull(sum( CASE WHEN type = '2' THEN cnt END ),0) AS type2 
   from (
             select car_no,type,count( * ) AS cnt  from  tb_warning_info where
   	  begin_time >= #{start} and begin_time <= #{end} 
             group by car_no,type
   ) a  group by car_no
   
   When #{start} >= 2021-01-01 00:00:00 and #{end} <= 2021-12-31 23:59:59, the result is right
   [{"type2":0,"car_no":"云EXXXXX","type1":1}]
   When #{start} >= 2020-01-01 00:00:00 and #{end} <= 2020-12-31 23:59:59, the result is right
   [{"type2":1,"car_no":"云EXXXXX","type1":0}]
   
   But when #{start} >= 2020-01-01 00:00:00 and #{end} <= 2021-12-31 23:59:59
   the result must be [{"type2":1,"car_no":"云EXXXXX","type1":1}], but got [{"type2":0,"car_no":"云EXXXXX","type1":1}]
   i really think it should return [{"type2":0,"car_no":"云EXXXXX","type1":1},{"type2":1,"car_no":"云EXXXXX","type1":0}]
   i can calculate by myself
   so what should i do in this scenario or is it should support this scenario?
   
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - 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**.
   


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

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


[GitHub] [shardingsphere] RaigorJiang closed issue #11437: The result isn't right in Row to Column scenario

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #11437: The result isn't right in Row to Column scenario
URL: https://github.com/apache/shardingsphere/issues/11437


-- 
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] github-actions[bot] commented on issue #11437: The result isn't right in Row to Column scenario

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #11437:
URL: https://github.com/apache/shardingsphere/issues/11437#issuecomment-1272350810

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] RaigorJiang commented on issue #11437: The result isn't right in Row to Column scenario

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

   This issue has been inactive for too long, and ShardingSphere has released several new versions, so I will close it.
   Users are advised to try the latest version, and if the problem reproduces, please reopen it or submit a new one.


-- 
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] github-actions[bot] closed issue #11437: The result isn't right in Row to Column scenario

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #11437: The result isn't right in Row to Column scenario
URL: https://github.com/apache/shardingsphere/issues/11437


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