peilinqian commented on issue #22576:
URL: 
https://github.com/apache/shardingsphere/issues/22576#issuecomment-1348141112

   **version**
   ```
   we find java version: java8, full_version=1.8.0_282, 
full_path=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64/bin/java
   ShardingSphere-5.2.2-SNAPSHOT
   Commit ID: dirty-631fdf40f87223e176abe5c851a51b3287b4d6de
   Commit Message: Fix wrong decide result when execute same sharding condition 
subquery with sql federation 
(https://github.com/apache/shardingsphere/pull/22754)
   Branch: 
https://github.com/apache/shardingsphere/commit/631fdf40f87223e176abe5c851a51b3287b4d6de
   Build time: 2022-12-12T10:48:40+0800
   ```
   **result :pass**
   ```
   test_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 00:00:00.0
   (1 row)
   
   test_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
   ----------+---------+--------+-------------+--------+-----------------------
        1500 |      15 | init   |           1 |        | 2017-08-28 00:00:00.0
        1800 |      18 | finish |          13 | test   | 2017-08-18 00:00:00.0
   (2 rows)
   
   test_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
   ----------+---------+--------+-------------+--------+-----------------------
        1500 |      15 | init   |           1 |        | 2017-08-28 00:00:00.0
        1800 |      18 | finish |          13 | test   | 2017-08-18 00:00:00.0
   (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]

Reply via email to