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

Querying DuckDB using Polars' logical plan #17997

Closed
agupta726 opened this issue Aug 1, 2024 · 7 comments
Closed

Querying DuckDB using Polars' logical plan #17997

agupta726 opened this issue Aug 1, 2024 · 7 comments
Labels
enhancement New feature or an improvement of an existing feature

Comments

@agupta726
Copy link

agupta726 commented Aug 1, 2024

Description

I want to build my application logic using the Polars dataframe API - projections, join, filtering etc and then use DuckDB to actually execute the query represented by the Polars dataframe. I suppose one way to think about this would be that I want to use Polars dataframe API only for plan generation (perhaps a Substrait plan?) but not as an engine. I'd want to pass this plan to DuckDB to do the actual execution.
Is there any way to do this? Or can this be accepted as a feature request?

@agupta726 agupta726 added the enhancement New feature or an improvement of an existing feature label Aug 1, 2024
@cmdlineluser
Copy link
Contributor

I think this may have been previously requested:

Which was deemed not possible due to the reasons explained in: #7404 (comment)

@alexander-beedie
Copy link
Collaborator

alexander-beedie commented Aug 2, 2024

Curious why you'd want to run the Polars API on the DuckDB engine? I can't see that it's something we would be that interested in developing/supporting 🤔

(Depending on what is required, could be a job for a future iteration of Narwhals, @MarcoGorelli?)

@agupta726
Copy link
Author

Curious why you'd want to run the Polars API on the DuckDB engine? I can't see that it's something we would be that interested in developing/supporting 🤔

(Depending on what is required, could be a job for a future iteration of Narwhals, @MarcoGorelli?)

Honestly I'm looking for a Spark like dataframe API for but C++. I have a need to generate complex SQL and I believe using a dataframe API is the right way to do it.

Any recommendations are appreciated.

@cmdlineluser
Copy link
Contributor

Have you seen DuckDB's spark api?

@agupta726
Copy link
Author

Have you seen DuckDB's spark api?

Thanks @cmdlineluser. I did see this already. I'm looking for a C++ based dataframe API though.

@ritchie46
Copy link
Member

I'm looking for a C++ based dataframe API though.

How is Polars going to help then? It is written in Rust.

@MarcoGorelli
Copy link
Collaborator

Honestly I'm looking for a Spark like dataframe API for but C++

closing then as out-of-scope

(Depending on what is required, could be a job for a future iteration of Narwhals, @MarcoGorelli?)

watch this space 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants