[
https://issues.apache.org/jira/browse/ARROW-17643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601353#comment-17601353
]
Dewey Dunnington commented on ARROW-17643:
------------------------------------------
In theory this should reproduce it (although it works for me):
{code:R}
library(arrow, warn.conflicts = FALSE)
#> Some features are not enabled in this build of Arrow. Run `arrow_info()` for
more information.
library(duckdb)
#> Loading required package: DBI
ds <- InMemoryDataset$create(
data.frame(
int = c(1L, 2L, 3L, NA, 5L, 6L),
dbl = c(1.1, 2.1, 3.1, 4.1, 5.1, 6.1),
dbl2 = c(5, 5, 5, 5, 5, 5),
lgl = c(TRUE, NA, TRUE, FALSE, TRUE, NA),
false = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
chr = c("a", "b", "c", "d", "e", NA),
fct = factor(c("a", "b", "c", "d", "g", "h"))
)
)
con <- dbConnect(duckdb::duckdb())
dbExecute(con, "PRAGMA threads=2")
#> [1] 0
table_one_name <- "my_arrow_table_1"
table_one <- to_duckdb(ds, con = con, table_name = table_one_name)
table_two_name <- "my_arrow_table_2"
table_two <- to_duckdb(ds, con = con, table_name = table_two_name)
dbGetQuery(
con,
paste0(
"SELECT * FROM ", table_one_name,
" INNER JOIN ", table_two_name,
" ON ", table_one_name, ".int = ", table_two_name, ".int"
)
)
#> int dbl dbl2 lgl false chr fct int dbl dbl2 lgl false chr fct
#> 1 1 1.1 5 TRUE FALSE a a 1 1.1 5 TRUE FALSE a a
#> 2 2 2.1 5 NA FALSE b b 2 2.1 5 NA FALSE b b
#> 3 3 3.1 5 TRUE FALSE c c 3 3.1 5 TRUE FALSE c c
#> 4 5 5.1 5 TRUE FALSE e g 5 5.1 5 TRUE FALSE e g
#> 5 6 6.1 5 NA FALSE <NA> h 6 6.1 5 NA FALSE <NA> h
dbDisconnect(con, shutdown = TRUE)
{code}
> [R] Latest duckdb release is causing test failure
> -------------------------------------------------
>
> Key: ARROW-17643
> URL: https://issues.apache.org/jira/browse/ARROW-17643
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Reporter: Dewey Dunnington
> Priority: Major
>
> The latest duckdb release was just put on CRAN (0.5.0), and when it's
> installed we get a test failure:
> {noformat}
> ── Error (test-duckdb.R:212:3): Joining, auto-cleanup enabled
> ──────────────────
> Error: rapi_execute: Failed to run query
> Error: Invalid Error: std::exception
> Backtrace:
> ▆
> 1. ├─DBI::dbGetQuery(...) at test-duckdb.R:212:2
> 2. └─DBI::dbGetQuery(...)
> 3. └─DBI (local) .local(conn, statement, ...)
> 4. ├─DBI::dbSendQuery(conn, statement, ...)
> 5. └─duckdb::dbSendQuery(conn, statement, ...)
> 6. └─duckdb (local) .local(conn, statement, ...)
> 7. └─duckdb:::duckdb_result(...)
> 8. └─duckdb:::duckdb_execute(res)
> 9. └─duckdb:::rapi_execute(...)
> [ FAIL 1 | WARN 1 | SKIP 28 | PASS 8460 ]
> Error: Test failures
> Execution halted
> Warning messages:
> 1: Connection is garbage-collected, use dbDisconnect() to avoid this.
> 2: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or
> duckdb::duckdb_shutdown(drv) to avoid this.
> 1 error ✖ | 0 warnings ✔ | 2 notes ✖
> {noformat}
> Unfortunately I can't reproduce this on either MacOS nor Ubuntu (20.04).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)