duckdb-r
duckdb-r copied to clipboard
Revisit `tbl.duckdb_connection()`
I don't understand the code and the test:
https://github.com/duckdb/duckdb-r/blob/aef914bf34f4ff7dd17b3c6f5b97586f04a9c93f/R/backend-dbplyr__duckdb_connection.R#L370-L379
https://github.com/duckdb/duckdb-r/blob/aef914bf34f4ff7dd17b3c6f5b97586f04a9c93f/tests/testthat/test_tbl__duckdb_connection.R#L30-L43
I have the following questions:
- What is this object cache for parquet files?
- We're only executing the
PRAGMA
withcache = TRUE
, is this desired? Should we also run it withcache = FALSE
? - Does the
PRAGMA
give a permanent side effect on the connection (yes according to the test)? Should we reset it afterward? - To my understanding, the use of
ident_q()
is discouraged and also has no effect here because we're usingNextMethod()
. What's the intention here, do we need it? - Extra arguments to
tbl()
seem to be broken via https://github.com/tidyverse/dbplyr/issues/1384, should we perhaps offer a different, more robust API? We could implement a dedicated function that documents all available pragmas and perhaps even offers them as autocomplete.
CC @mgirlich + @hannes.