Open mariadb-ChristianBauer opened 2 years ago
Hello @mariadb-ChristianBauer, sorry for the delayed response. I might need to look up the design of quals but it is a known limitation.
For now, you could use the following query to stay unblocked:
select
t.organization as organization,
t.name as team_name,
t.slug as team_slug,
t.privacy as team_privacy,
t.description as team_description,
tm.login as member_login,
tm.role as member_role,
tm.state as member_state
from
github_team as t,
github_team_member as tm
where
t.organization = tm.organization
and t.slug = tm.slug
and tm.role = 'maintainer';
Please let me know if it unblocks you. Thanks once again for raising this issue and apologies for the delayed response 👍 .
Hi @misraved , A workaround has already been found, but it is not optimal.
Thanks for the update @chr-b 👍 .
@chr-b @mariadb-ChristianBauer could you please try with steampie v0.17.1
and github v0.24.0
and check if the issue still persists?
Thanks for you patience 👍 .
Hi @misraved ,
Results are mixed.
When using one element in the slug
list:
> select
login
from
github_team_member
where
organization IN (select login from github_my_organization)
AND slug IN ('team-A')
+------------------------+
| login |
+------------------------+
| my-user-id |
+------------------------+
When using two elements in the slug list:
select
login
from
github_team_member
where
organization IN (select login from github_my_organization)
AND slug IN ('team-B', 'team-A')
Error: rpc error: code = Internal desc = 'List' call for table 'github_team_member' is missing 1 required qual: column:'organization' operator: =
(SQLSTATE HV000)
Version numbers:
$ steampipe -v
steampipe version 0.17.1
$ steampipe plugin list | grep github
| hub.steampipe.io/plugins/turbot/github@latest | 0.24.0 | github |
Thanks for the reply @chr-b 👍. I am still investigating it, I have similar results as you do. I will try to check if something funky turns up in the Postgres planner 👍.
Thanks for your patience, I will keep you posted once I have some more data.
'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
This issue still exists in plugin version 0.25
'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
Was able to reproduce when using a query similar to that posted above:
select
organization,
slug,
login
from
github_team_member
where
organization IN (select login from github_my_organization)
AND slug IN ('steampipe', 'steampipe-read', 'steampipe-admin');
Result: [HV000] ERROR: rpc error: code = Internal desc = 'List' call for table 'github_team_member' is missing 1 required qual: column:'organization' operator: =
Weirdly, can adjust to lock the first IN
down to one exact value and the query works:
select
organization,
slug,
login
from
github_team_member
where
organization IN (select login from github_my_organization where login = 'turbot')
AND slug IN ('steampipe', 'steampipe-read', 'steampipe-admin');
Query plan from not working approach:
Query plan & analysis from working approach:
@kaidaguerre - is it possible that this is an issue in the FDW?
It's possible - I suggest looking in the database logs with INFO enabled and see if it reports any failures to convert quals
I've sent you some logs
@kaidaguerre, I've transferred this issue to the FDW repo for better tracking, as this looks like an FDW issue. Please let us know if anything is required from the plugin team.
@misraved @bigdatasourav this does not look like an FDW issue - it is a query planning issue - the quals are not being provided to the FDW by Postgres
You need to try to restructure the query to get the desired plan
Describe the bug It is not possible to provide a set instead of a single value for the organization field when querying the
github_team_member
table. This is supported for theslug
field though.Steampipe version (
steampipe -v
) version 0.16.3Plugin version (
steampipe plugin list
) | hub.steampipe.io/plugins/turbot/github@latest | 0.22.0 | github |To reproduce Query:
Expected behavior Support both
=
andin
for theorganization
field.Additional context There is 1 organization in my
github_my_organization
.