EnterpriseDB / mysql_fdw

PostgreSQL foreign data wrapper for MySQL
Other
521 stars 160 forks source link

Support IS DISTINCT FROM expression #251

Closed MinhLA1410 closed 11 months ago

MinhLA1410 commented 2 years ago

Currently, we already implement to support IS DISTINCT FROM expression like postgres_fdw for mysql_fdw. I would like to contribute them into repository and community. If you have interest? I will create pull request for share this feature.

Summary modification:

Reference testcase of postgres_fdw.sql in postgres_fdw:

EXPLAIN (VERBOSE, COSTS OFF)
  SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c7 IS NOT NULL);
                                                                               QUERY PLAN                                                                               
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Foreign Scan on public.ft1 t1
   Output: c1, c2, c3, c4, c5, c6, c7, c8
   Local server startup cost: 10
   Remote query: SELECT `c1`, `c2`, `c3`, `c4`, `c5`, `c6`, `c7`, `c8` FROM `mysql_fdw_post`.`position_data1` WHERE ((NOT ((`c1` IS NOT NULL) <=> (`c7` IS NOT NULL))))
(4 rows)
surajkharage19 commented 1 year ago

Thanks.

We have added IS DISTINCT FROM clause support in mysql_fdw after your request. Can you please check if that is useful for you and share your feedback? If you are happy with the latest addition, then can you please close the case from your end?

jeevanchalke commented 11 months ago

Committed the requested feature already. However, there is no feedback from the requester. So, closing the request.