Not in the RStudio IDE, not in the plain terminal. Hitting Ctrl + C when running this script will achieve nothing.
@hannes: I checked, we either need to call R_CheckUserInterrupt() periodically, or perhaps install our own signal handler and remove it for every single call to an R API. Is there a callback from duckdb that would be fired regularly from the main thread?
library(DBI)
con <- dbConnect(duckdb::duckdb())
dbExecute(con, "CREATE TABLE data AS SELECT unnest(generate_series(1, 100000)) AS a")
#> [1] 1e+05
system.time(dbGetQuery(con, "SELECT COUNT(*) FROM data JOIN data AS data2 ON data.a != data2.a"))
#> user system elapsed
#> 10.027 0.060 10.514
dbDisconnect(con)
Created on 2024-10-19 with reprex v2.1.1
Not in the RStudio IDE, not in the plain terminal. Hitting Ctrl + C when running this script will achieve nothing.
@hannes: I checked, we either need to call
R_CheckUserInterrupt()periodically, or perhaps install our own signal handler and remove it for every single call to an R API. Is there a callback from duckdb that would be fired regularly from the main thread?Created on 2024-10-19 with reprex v2.1.1