Repository navigation
Conversation
Question: How far to follow RSQLite's native Arrow stackRSQLite's native stack (r-dbi/RSQLite#880) is unmerged: from #830 up its CI is red on five expectations, a High finding on #866 is open, and its DBI methods (plan PRs 16 and 17) haven't started. #584 already gives RMariaDB the full Arrow interface through DBI's default methods, which go through data frames. The native stack proposed in this PR is about 13 PRs of C++ on top of #587's chunk store.
If nobody decides, I start group A only. Generated by Claude Code |
Question: The time zone of Arrow timestampsRMariaDB's data frames return
If nobody decides, layer 5 uses the first option. Generated by Claude Code |
Question: The Arrow type of
|
This pull request carries no code, only an empty commit. It holds the plan for implementing the DBI Arrow interface natively in RMariaDB, following RSQLite's open stack (r-dbi/RSQLite#880, from #850 to #867), and the questions about it, each posted as its own comment.
State on 2026-11-29
maindoes today. fix:dbCreateTable()gives character columns of zero-row data frames a type that holds any string #588, stacked on it, fixesdbCreateTable()with a zero-row data frame makes character columnsVARCHAR(1)#585. With both, every DBItest Arrow spec passes except the twotimestamp_extendedones (Arrow timestamp round trip warns about loss of precision that doesn't happen #586).dbFetch()with storage-aware column types #587 (ALTREP fetch) is adding a per-chunk column store over libmariadb's buffers. The native Arrow layers below will read from that store instead of readingMYSQL_BINDbuffers a second time. The two sessions have agreed the split: feat: ALTREP-backeddbFetch()with storage-aware column types #587 ownssrc/MariaRow.*,src/MariaResultPrep.*,src/MariaTypes.*and thedbFetch()R code, and the Arrow work goes into new files.How RMariaDB differs from RSQLite
?placeholder has no type at prepare time.dbClearResult()or the next query (#865) therefore needs to be detached:mysql_stmt_store_result()buffers the remaining rows, andmysql_close()is deferred until the last stream ends.max_allowed_packet.RMariaDB.src/Makevarsis generated fromsrc/Makevars.inbyconfigure, andsrc/Makevars.winexists separately, so the build rule goes into both. A simpler option is to putnanoarrow.candnanoarrow.hdirectly insrc/.Proposed stack (bottom to top)
Group A, no behavior change:
refactor: Bind list parameters through a parameter source(like refactor: Bind list parameters through a parameter source RSQLite#855)refactor: Own results through a shared pointer, with a virtual destructor(like #856)build: Vendor the nanoarrow C library(like #857)Group B, internal engine with unexported entry points, built on #587's chunk store:
feat: Build Arrow arrays from the columns of a result(like #859 and #860 combined, since the typing is static)feat: Build Arrow date, time and timestamp arrays(like #861; see the questions on time zones and TIME)feat: Report values an Arrow column can't hold once per chunk(like #862, reduced)feat: End Arrow chunks before string and binary offsets overflow(like #863)feat: Read a result as a lazy Arrow array stream, including the thread check (like #864)feat: Let Arrow streams outlive dbClearResult(), another query and dbDisconnect()(like #865, with the detach)feat: Bind the rows of an Arrow stream to a statement(like #866). A test must show that binding anINSERTto a stream that reads the same table ends, which is RSQLite's open High.feat: Check dictionary indices, offsets, lengths and self-binding of Arrow parameters(like #867)Group C, DBI methods (RSQLite's plan PRs 16 and 17, not started there):
feat: Implement dbSendQueryArrow(), dbFetchArrow(), dbFetchArrowChunk() and dbGetQueryArrow() nativelyfeat: Implement dbBindArrow(), dbAppendTableArrow(), dbCreateTableArrow() and dbWriteTableArrow() nativelyschema, and bulk binding with MariaDB Connector/C'sSTMT_ATTR_ARRAY_SIZE.Nothing in groups A to C starts before the questions below are answered and #587's chunk store is pushed.
Open questions
TIMEcolumnsSession: https://claude.ai/code/session_01Hr1rd5PUWgaCJzotWt9NhJ
Generated by Claude Code