Repository navigation
Conversation
nanoarrow leaves the bits past the last row in the last byte of a validity bitmap uninitialized when the bitmap grows. A consumer that copies that byte, such as the writer of an IPC stream, copied undefined values, which valgrind reported. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…l make Only a call of the same stream is refused. A fetch of the result by other means gets the rows after the chunk whose warnings run, before that chunk is handed out. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…y the Arrow rows that are returned The warnings about the values of a data frame fetch are collected and raised once the fetch has returned and the result is no longer busy, as for Arrow chunks. A warning made an error with `options(warn = 2)`, or caught by `tryCatch(warning = )`, loses the rows of that fetch only, which count as fetched, and the next fetch goes on after them, as in RSQLite 3.54.1. Before, it ended the execution. A handler of these warnings can now fetch from the result or clear it. An SQLite error during an Arrow fetch no longer counts the rows that the fetch read and lost. The classifying interrupt check runs only inside an Arrow fetch: an interrupt of `dbBind()` of a result claimed for Arrow fetches is an interrupt again, not an error that says it ended the Arrow fetches. The fetches and binds check every 1024 rows or steps, Arrow fetches every 16384, as one function states. Comments mark the code paths that only the tests use. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…to claude/rb-stack-review-read
…to claude/rb-stack-review-read
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Member
Author
Question: should a data frame fetch whose warning exits keep its rows for the next fetch, as an Arrow chunk does?This pull request raises the conversion warnings of
Kirill decides. Until then the first option stays as implemented. Generated by Claude Code |
…to claude/rb-stack-review-read
…e its SQLite error The warnings about the values of a data frame fetch are kept as runs of the same message with a count, so that a column of many values that can't be converted no longer costs memory for each value. They are raised as many times, in the same order, as before. The warnings about the values of the rows read before an SQLite error are raised before the error, as in RSQLite 3.54.1, once the fetch has left the busy guard. The warnings about the columns are still left out for a failed fetch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…o claude/rb-stack-review-read
This was referenced Dec 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes for users:
dbFetch()raises its warnings about the values (mixed types, invalid UTF-8, dates, times and timestamps that can't be parsed) once the fetch has read its rows and the result is no longer busy. A warning made an error withoptions(warn = 2), or caught bytryCatch(warning = ), again loses only the rows of that fetch, which count indbGetRowCount(), and the next fetch goes on after them, as in RSQLite 3.54.1. On the stack head such a warning ended the whole execution:dbHasCompleted()returnedTRUEand every later fetch returned zero rows. A calling handler of these warnings can now fetch from the result or clear it. A date that can't be parsed no longer makes the next fetch convert its row again. The NEWS bullet of #935 is corrected accordingly.The warnings are kept as runs of the same message with a count, so a column of many values that can't be converted costs about as much memory as on main; values whose messages alternate still take one entry per switch, so 3e6 alternating blob and unparsable text values peak at 460 MB against 204 MB on main (accepted). The warnings about the values read before an SQLite error are raised before that error, as on main. When an interrupt or an R error ends a data-frame fetch, its collected warnings are dropped along with its rows (accepted).
Arrow side (internal): an SQLite error during an Arrow fetch no longer counts the rows that the fetch read and lost, in line with the rule that rows count once they are returned (an interrupt already counted right). An interrupt of
dbBind()on a result claimed for Arrow fetches is an interrupt again instead of an R error saying it "ended the Arrow fetches": the classifying interrupt check now runs only inside an Arrow fetch. The interrupt intervals are stated once (interrupt_interval(): 1024 rows or steps, 16384 in an Arrow fetch), and the comments that disagreed are fixed. Arrow arrays with NULLs zero the unused tail bits of their validity bitmap, so that valgrind no longer reports uninitialized bytes in IPC output. The comment on refused stream calls now says that only calls of the same stream are refused. Test-only paths are marked as such.How it's tested: the data frame tests in test-fetch-error.R, test-fetch-error-rows.R, test-extendedTypes.R and a new test in test-dbClearResult.R fail on the base (red: 16 + 1 + 1 + 1 failures) and pass with the fix, covering
warn = 2,tryCatch(warning = ), a kept SQLite error after the warning, the read lock, and a handler that fetches and clears. The busy-guard tests now trigger their in-fetch warning with the warning about dropped rows, which is still raised inside the fetch. The Arrow count tests in test-arrow-chunks.R ("lost, and not counted") fail on the base (3 failures) and pass with the fix. A new callr test interrupts a bind of an Arrow-claimed result (red on the base). Full suite with NOT_CRAN=true: FAIL 0, PASS 13485. Valgrind on all test-arrow-*.R files: 0 errors (two pre-existing valgrind-only failures in test-arrow-text.R from long double emulation); the reviewer's probe p4.R: 0 errors, 12 on the base.Where it sits: a follow-up layer of stack #928 that fixes the read-side findings of the review of the whole stack, based on #976 (write-side fixes), on top of #971.
Coordinating session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Generated by Claude Code