-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange activity about join query with the join key condition. #63
Comments
Same, but works if in join clause for IN condition will have 2 items - works as expected INNER JOIN shop_member_property b ON ( a.shop_member_id = b.shop_member_id and a.shop_member_id in ( '6d34478f-626d-d162-6758-e9fc98dcd6a3', 'some_unknown_shop_member_id') ) |
How to reproduce: On Clickhouse:
then on CH FDW
Then run
and it will fail with Explain verbose will give |
Hi, thank you for the script to reproduce. |
Hello , Here is the my sql query
explain verbose
SELECT
a.shop_member_id
, a.mall_id
, a.shop_no
, a.member_id
, a.cmember_name
, b.email
, b.cell
FROM
shop_member as a
INNER JOIN shop_member_property b ON ( a.shop_member_id = b.shop_member_id and a.shop_member_id in ( '6d34478f-626d-d162-6758-e9fc98dcd6a3') )
WHERE 1=1
QUERY PLAN
Foreign Scan (cost=1.00..-1.00 rows=1 width=1)
Output: a.shop_member_id, a.mall_id, a.shop_no, a.member_id, a.member_name, b.email, b.cell
Relations: (shop_member a) INNER JOIN (shop_member_property b)
Remote SQL: SELECT r1.shop_member_id, r1.mall_id, r1.shop_no, r1.member_id, r1.c_member_name, r2.c_email, r2.c_cell FROM bidb.shop_member r1 ALL INNE
R JOIN bidb.shop_member_property r2 ON (TRUE) WHERE ((r2.shop_member_id = '6d34478f-626d-d162-6758-e9fc98dcd6a3')) AND ((r1.shop_member_id = '6d34478f-62
6d-d162-6758-e9fc98dcd6a3'))
(4 rows)
Received exception from server (version 20.6.4):
Code: 403. DB::Exception: Received from localhost:9000. DB::Exception: Cannot get JOIN keys from JOIN ON section: TRUE.
The text was updated successfully, but these errors were encountered: