Reconstruction and `as_duckplyr_df()`
Closed this issue · 0 comments
krlmlr commented
This should keep the "duckplyr_df"
class?
options(conflicts.policy = list(warn = FALSE))
library(duckplyr)
Sys.setenv(DUCKPLYR_FALLBACK_INFO = TRUE)
data.frame(a = 1:3, b = as.integer(c(1, 1, 2))) |>
as_duckplyr_df() |>
summarize(sum(a, na.rm = TRUE), .by = b) |>
class()
#> Error processing with relational.
#> Caused by error:
#> ! Binder Error: No function matches the given name and argument types 'sum(INTEGER, BOOLEAN)'. You might need to add explicit type casts.
#> Candidate functions:
#> sum(DECIMAL) -> DECIMAL
#> sum(SMALLINT) -> HUGEINT
#> sum(INTEGER) -> HUGEINT
#> sum(BIGINT) -> HUGEINT
#> sum(HUGEINT) -> HUGEINT
#> sum(DOUBLE) -> DOUBLE
#> [1] "data.frame"
Created on 2023-10-15 with reprex v2.0.2