MnameHZJ commented on issue #17106:
URL: https://github.com/apache/doris/issues/17106#issuecomment-1443453381
将原语句中的`f.post_time = p.post_time` 改为 `f.post_time >= '2022-12-23 00:00:00'
AND f.post_time <= '2022-12-26 00:00:00'` 以及 `t.post_time = p.post_time` 改为
`t.post_time >= '2022-12-23 00:00:00' AND t.post_time <= '2022-12-26 00:00:00'`
,就不会出现该问题:
```
SELECT
/*+SET_VAR(parallel_fragment_exec_instance_num=4) */
p.enterprise_id,
u.id user_name,
p.id pack_id,
f.id frame_id,
t.id TId,
t.ticket_id,
UNIX_TIMESTAMP(p.post_time),
UNIX_TIMESTAMP(t.post_time),
UNIX_TIMESTAMP(f.post_time)
FROM
gsms_user_5 AS u
JOIN gsms_msg_pack_sms_8 AS p ON u.id = p.user_id
JOIN gsms_msg_frame_sms_8 AS f ON p.id = f.msg_pack_id AND
f.post_time >= '2022-12-23 00:00:00' AND f.post_time <= '2022-12-26 00:00:00'
JOIN gsms_msg_ticket_sms_8 t
ON t.frame_id = f.id AND t.post_time >= '2022-12-23 00:00:00'
AND t.post_time <= '2022-12-26 00:00:00'
WHERE t.user_id = 182615
-- AND p.enterprise_id = 186213
AND p.post_time >= '2022-12-23 00:00:00'
AND p.post_time <= '2022-12-26 00:00:00'
AND p.msg_type IN (0, 1)
AND (
t.sms_type = 0
OR (t.sms_type = 2
AND t.number = 1)
)
ORDER BY t.id
LIMIT 0, 20;
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]