strongduanmu commented on issue #22576:
URL:
https://github.com/apache/shardingsphere/issues/22576#issuecomment-1340843258
Following is the latest result.
```sql
sharding_db=> (select * from t_order where order_id = 1500 union select *
from t_order where order_id = 1800 )INTERSECT select * from t_order where
status ='finish' order by order_id;
order_id | user_id | status | merchant_id | remark | creation_date
----------+---------+--------+-------------+--------+---------------
1800 | 18 | finish | 13 | test | 2017-08-18
(1 row)
sharding_db=> select * from t_order where order_id = 1500 union (select *
from t_order where order_id = 1800 INTERSECT select * from t_order where
status ='finish' order by order_id); --incorrect
order_id | user_id | status | merchant_id | remark | creation_date
----------+---------+--------+-------------+--------+---------------
1800 | 18 | finish | 13 | test | 2017-08-18
1500 | 15 | init | 1 | | 2017-08-28
(2 rows)
sharding_db=> select * from t_order where order_id = 1500 union select *
from t_order where order_id = 1800 INTERSECT select * from t_order where
status ='finish' order by order_id; --incorrect
order_id | user_id | status | merchant_id | remark | creation_date
----------+---------+--------+-------------+--------+---------------
1500 | 15 | init | 1 | | 2017-08-28
1800 | 18 | finish | 13 | test | 2017-08-18
(2 rows)
```
--
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]