paleolimbot opened a new issue, #466:
URL: https://github.com/apache/arrow-adbc/issues/466

   Encountered when working with the SQLite driver in R. I ran
   
   ```r
   # remotes::install_github("apache/arrow-nanoarrow/r")
   # remotes::install_github("apache/arrow-adbc/r/adbcdrivermanager")
   # 
remotes::install_github("paleolimbot/arrow-adbc/r/adbcsqlite@r-sqlite-driver", 
build = FALSE)
   
   library(adbcdrivermanager)
   
   # Use the driver manager to connect to a database
   db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = "test.db")
   con <- adbc_connection_init(db)
   
   # Write a table
   flights <- nycflights13::flights
   # (timestamp not supported yet)
   flights$time_hour <- NULL
   
   stmt <- adbc_statement_init(con, adbc.ingest.target_table = "flights")
   adbc_statement_bind(stmt, flights)
   adbc_statement_execute_query(stmt)
   adbc_statement_release(stmt)
   
   stmt <- adbc_statement_init(con) |> 
     adbc_statement_set_sql_query("COMMIT TRANSACTION")
   adbc_statement_execute_query(stmt)
   adbc_statement_release(stmt)
   
   # Clean up
   adbc_connection_release(con)
   adbc_database_release(db)
   ```
   
   ...which resulted in a "hang" on `sqlite3_step()`...the debugger seems to 
indicate that in SQLite3 this is happening when synchronizing the -journal file 
(I think I see the -journal file being created and deleted rapidly). If I run 
the same thing with `adbc.connection.autocommit = "true"` the whole thing runs 
rather quickly.
   
   I'm not sure this is an actual "hang"...I think it's just a lot of 
unnecessary commits (maybe even one after each row?). The table I'm trying to 
insert is ~300000 rows. This also only occurs when using a file...(`:memory:` 
does the bulk ingest no problem).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to