Skip to content
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

Push down quals in foreign table scan #47

Closed
rebasedming opened this issue Jul 11, 2024 · 4 comments
Closed

Push down quals in foreign table scan #47

rebasedming opened this issue Jul 11, 2024 · 4 comments
Assignees
Labels
feature New feature or request good first issue Good for newcomers priority-medium Medium priority issue

Comments

@rebasedming
Copy link
Contributor

What
The begin_scan function of the foreign data wrapper ignores quals, which means that predicates are not pushed down to DuckDB in the case that the query falls back to the FDW scan.

Why
Pushing down quals will make queries that fall back to the FDW faster. Could be useful for federated joins.

How
Parse quals and add them to the DuckDB query. I believe the clickhouse_fdw has a good implementation for this.

@kysshsy
Copy link
Contributor

kysshsy commented Jul 16, 2024

I can handle this if no one else is already working on it. I implemented a simple code, and it seems to work.(I think it's not cover all types) Is the main challenge that DuckDB types are not entirely compatible with PostgreSQL?(and my code needs to cover all corner cases) (I am not familiar with duckdb :)

@rebasedming
Copy link
Contributor Author

If you put up a draft PR with a description of the issue I can provide more pointed feedback.

@philippemnoel
Copy link
Collaborator

I can handle this if no one else is already working on it. I implemented a simple code, and it seems to work.(I think it's not cover all types) Is the main challenge that DuckDB types are not entirely compatible with PostgreSQL?(and my code needs to cover all corner cases) (I am not familiar with duckdb :)

No one else is working on it. We'd love for you to handle this feature :)

@philippemnoel philippemnoel added the good first issue Good for newcomers label Jul 17, 2024
@philippemnoel philippemnoel transferred this issue from paradedb/paradedb Aug 8, 2024
@philippemnoel philippemnoel added priority-medium Medium priority issue feature New feature or request labels Aug 8, 2024
@philippemnoel
Copy link
Collaborator

Solved by #39, thank you @kysshsy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers priority-medium Medium priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants