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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]