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/03/02 14:17:16 UTC

[GitHub] [shardingsphere] xfzhaoGit opened a new issue #15764: Do you support nested queries or sub queries for split tables? Version 5.1.0

xfzhaoGit opened a new issue #15764:
URL: https://github.com/apache/shardingsphere/issues/15764


   SELECT
       IFNULL(a.signOneInTime, ''),
       IFNULL(b.signOneOutTime, '')
   FROM
       (
           SELECT
               sum(sign_time) AS signOneInTime,
               date_str
           FROM
               original_sign_record  <!— no Slice table-->
           WHERE
               emp_id = ?
           AND sign_time < ?
           AND sign_time > ?
       ) a
   LEFT JOIN (
       SELECT
           sum(sign_time) AS signOneOutTime,
           date_str
       FROM
           original_sign_record <!— Slice table —>
       WHERE
           emp_id = ?
       AND sign_time < ?
       AND sign_time > ?
   ) b ON a.date_str = b.date_str
   
   original_sign_record,sum(sign_time)=1000
   original_sign_record2022 sum(sign_time)=500
   same conditions:sign_time,scan all tables
   
   expect:
   signOneOutTime=1500
   
   actual:
   occasionally signOneOutTime=1000,Occasional appearance  signOneOutTime=500
   
   


-- 
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] xfzhaoGit commented on issue #15764: Do you support nested queries or sub queries for split tables? Version 5.1.0

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


   sharding-jdbc 5.1.0


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