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

feat: across() tweaks #318

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions R/duckplyr-across.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,13 @@ fn_to_expr <- function(fn, env) {
# Memoize get_ns_exports_lookup() to avoid recomputing the hash of
# every function in every namespace every time
on_load({
get_ns_exports_lookup <<- memoise::memoise(get_ns_exports_lookup)
env <- environment()
assign("get_ns_exports_lookup", memoise::memoise(get_ns_exports_lookup), envir = env)
})

get_ns_exports_lookup <- function(ns) {
names <- getNamespaceExports(ns)
objs <- mget(names, ns)
objs <- mget(names, ns, ifnotfound = list(NULL))
funs <- objs[map_lgl(objs, is.function)]

hashes <- map_chr(funs, hash)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-relational-duckdb.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ test_that("duckdb_rel_from_df()", {
map(df, vec_ptype)
)

# FIXME: Test that vec_ptype_safe() does not materialize (#149),
# remove test-altrep.R

skip_if(Sys.getenv("DUCKPLYR_CHECK_ROUNDTRIP") == "TRUE")

# If this is no longer an eror, we need to make sure that subsetting
Expand Down
Loading