duckdb / duckdb-r

The duckdb R package
https://r.duckdb.org/
Other
131 stars 23 forks source link

Make `duckdb_register` as a generic function #98

Open eitsupi opened 8 months ago

eitsupi commented 8 months ago

Currently there is a separate function named duckdb_register_arrow available apart from duckdb_register, but I am wondering if these can be made into one S3 generic function.

krlmlr commented 8 months ago

Thanks. What other use cases do you have in mind?

eitsupi commented 8 months ago

What other use cases do you have in mind?

Not that I have any other use cases, but I felt that I didn't want to use another function when supporting Apache Arrow implementations outside of the arrow package in the future.

krlmlr commented 8 months ago

What do you mean by "supporting Apache Arrow implementations" -- nanoarrow?

What other table-like objects would we want to register?

eitsupi commented 8 months ago

I assumed something like nanoarrow array or polars DataFrame. Of course to support them, the C++ code in the duckdb package would have to be changed, I suppose.

krlmlr commented 8 months ago

But if we change the C++ code anyway, we can surely add a new duckdb_register_*() function?