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

Rethink rapi_rel_sql() #540

Open
krlmlr opened this issue Oct 31, 2024 · 0 comments
Open

Rethink rapi_rel_sql() #540

krlmlr opened this issue Oct 31, 2024 · 0 comments

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented Oct 31, 2024

duckdb/duckdb#14629 (comment)

Is our implementation doing too much? The code example is this:

con <- DBI::dbConnect(duckdb())
rel <- rel_from_df(con, mtcars)
rel2 <- rel_sql(rel, "SELECT hp, cyl FROM _ WHERE hp > 100")

The relation is converted to a view named _, and then a query is run on this and materialized as an R data frame.

To be honest, I don't think this is used a lot, and it's not exported. I don't have access to https://github.com/duckdblabs/duckdb-internal/issues/1721 (referred to from #138), so I may not understand the importance of this.

We definitely should make it easy to create a table (and perhaps also a view) from a relational object, and also to represent a table or view as a relational object. When this is done, this function can be deleted I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant