Repository navigation
Conversation
A complex vector, or a list with an element that is neither raw nor NULL, now fails before the result drops its previous bind, as an Arrow column of a type that can't be bound does. Before, it failed in the first row it reached: the result was left unbound after running the parameter sets before it. The error keeps its class and message. The tests that let a later parameter set fail to bind now exceed SQLite's length limit instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…they are An error of `dbGetQuery()` names `dbFetch()` for a row after the first, and NEWS compares the call of an error in `dbExecute()` with RSQLite 3.54.1, which gave no call. An Arrow stream binds a null struct row as NULL, and uint32, int64 and uint64 values as integers, where the data frame that nanoarrow converts it to keeps the values and holds doubles that bind as reals. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…qliteError::code()` The external pointer of `connection_connect()` kept its tag and finalizer only through the named return value optimization, as cpp11's move constructor makes a new pointer without them. It now returns the SEXP itself, as `result_create()` does. 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
…ed vectors The tests no longer warn about a result closed under them. NEWS also says that a zero-length vector that can't be bound is refused, and that the error of such a list element in `dbGetQuery()` now names `dbBind()`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…d list element `dbBind()` refuses `raw(0)` and `complex(0)` and keeps the previous bind, and `dbGetQuery()` raises the error of a list element in a later row from `dbBind()`, with no `rows` and before any row runs. The tests clear their result on exit if it is still valid. NEWS cites the pull request for the whole change and says that the error's call is `dbBind()`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
…te 3.54.1 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
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.
A follow-up of the review of the whole stack at its top, on the write side. The plan is in #880.
What changes for users:
dbBind()now refuses a vector it can't bind (a complex vector, or a list with an element that is neither raw norNULL) before it binds anything, and the result keeps its previous binding, as it already did for the wrong number of parameters and as an Arrow column of a type that can't be bound (such as decimal128) does. Before, the data frame path failed in the first row that reached the bad element: it ran the parameter sets before that element and left the result unbound, so the same kind of type error left a different state than on the Arrow path, against the NEWS promise that input refused before binding keeps the previous binding. The error keeps its class (RSQLite_error_error) and message. Tests that relied on a list element failing in a later row now exceed SQLite's length limit instead, which still fails in that row.Also, with no change of behavior: the NEWS sentence about the call of an error in
dbExecute()compares with what RSQLite 3.54.1 showed (no call) rather than with an earlier state of this unreleased stack;?"RSQLite-conditions"says that an error ofdbGetQuery()in a row after the first namesdbFetch(); the comments that said Arrow binds "asdbBind()binds a data frame" now state the two deliberate differences (a null struct row binds NULL, and uint32, int64 and uint64 bind as INTEGER where the converted data frame binds REAL);connection_connect()returns the SEXP of its external pointer, asresult_create()does, instead of relying on NRVO to keep its tag and finalizer; and the unusedSqliteError::code()is gone.Tested: the new tests in test-dbBind.R and test-arrow-bind.R fail on the base (four tests) and pass with the fix. The full suite with
NOT_CRAN=truegives FAIL 0, WARN 7, SKIP 64, PASS 13470.Based on #971, the top of stack #928. Not ported from an old PR.
Coordinating session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Generated by Claude Code