Repository navigation
Conversation
Values that are not of their column's Arrow type were reported with one warning per column, raised while the row was read and naming only the first offending storage class. They are now logged per column while a chunk is built, with their 1-based row numbers in the result, and reported once per chunk by a single warning of class `RSQLite_warning_coercion` that lists every column and the rows, truncated like cli does it, and carries the details in its `coercions` field. cli formats the bullets when it is installed, checked once per session, rlang's own formatting is used otherwise. The date, time and timestamp parsers now report failures the same way instead of one warning per value, and a blob in a text column is kept only if it is valid UTF-8 without NUL bytes, otherwise it becomes NULL and is listed in the warning. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EpBkzNMeuMBGy4nxTafYH6
The build regenerates the stubs of sources that are newer than them with absolute paths, and the development roxygen2 drops an import that `import(DBI)` covers anyway. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EpBkzNMeuMBGy4nxTafYH6
…legant-tesla-mja103-warnings
|
Review of this PR at 64a83c3, by a Claude Code reviewer with clean context that read the diff against Low1. 2. Values that land in a Checked and found sound
Generated by Claude Code |
krlmlr
left a comment
There was a problem hiding this comment.
The one code-level finding of the clean-context review, placed where it applies; the summary comment above carries the rest.
Generated by Claude Code
…legant-tesla-mja103-warnings The coercion log takes over #795's design of the current row: the storage class comes from `read_row()` and the bytes of a text value from `fetch_bytes()`, so the UTF-8 check of a blob in a text column reads the bytes that the byte limits counted. `append_row()` keeps the 1-based row number as its only argument, computed after the byte check, so a row held back to the next chunk is logged with its own number. The `AK_INT64` branch logs where it warned, after reading the value once. The Arrow test helpers of #796 move to `helper-arrow.R` with the others, and the tests that matched the old warning text match its class or its new text. The dependency files are regenerated through the fixed rule, without absolute paths. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
`rlang::warn()` has no `call` formal, so `call = NULL` became a field of the condition through `...`. The condition has no call either way, the message and the snapshot are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
A data frame fetch through Arrow reads several arrays, one per 65,536 rows and one per byte cut of the strings and blobs. Each array raised its own warning, naming the type the column had while it was built, `int64` for a column that became `double` later in the fetch. The columns now keep their log across the arrays of a fetch, and `fetch_arrow_df()` raises one warning after the arrays have been conformed to the final types. An Arrow stream and `dbFetchArrowChunk()` keep one warning per chunk, raised by `fetch_arrow()` and by `arrow_schema()` for the chunk kept for the schema, before the chunk is handed out or kept. The default path raises one warning per column with mixed types on the same fetches, which the comparison of both paths in `test-arrow-df.R` now checks instead of suppressing the warnings. The documentation says when each warning is raised and how the paths differ. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
A column whose first chunk held only `NULL`, without a declared type, is of the null type for the rest of an Arrow stream, and for the data frame fetches after a stream or `dbFetchArrowChunk()` has fixed the types. Its values become `NULL`, but they were logged with the reason `converted`, and listed as converted to the column type. They now have the reason `null_type` and read "dropped by the null type, NA" in the warning. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
dbFetch(), with their rows
|
Review of the fixes at 4a4e580 (the merge of #796 in 9a5cfc2 and the three commits after it), by a Claude Code reviewer with clean context that read the PR description, the first review, the combined diff of the merge and the three commits, ran The first review's findings
New findingsMedium1. A coercion warning that exits 2. A warning that exits the schema request of a stream silently loses the first chunk. Confirmed. Low3. The data frame path does not warn on 4. Row numbers that are round multiples of 100000 print in scientific notation. Confirmed. The rows reach R as doubles ( 5. The coercion log of a fetch that fails is reported by the next fetch. Confirmed. The log is cleared only by 6. A string too large for 32 bits in an integer column gives an Checked and found sound
Generated by Claude Code |
…s warning The warning of a data frame fetch through Arrow came before `reopen()`. A warning that exits the fetch, through an exiting handler or `options(warn = 2)`, left a column that had seen only `NULL` fixed as the null type, and the next fetch dropped its values where the default path types them. The warning now comes last, after the columns are reopened. A reopened column held no values, so the types named in the warning are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
The schema request of an Arrow stream fetched the first chunk, warned about its values, and only then kept it. A warning that exits the request had consumed the rows and frozen the types, so a retry returned the schema and the stream went on with the second chunk. The chunk is now kept and the types frozen before the warning, so a retry returns the schema and every row. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
The columns keep their coercion log across the arrays of a data frame fetch, until the warning reports it. A fetch that failed, by an error of the statement or an interrupt, left the values it had logged, and the next fetch reported them with rows it did not return. `fetch_arrow()`, `fetch_arrow_df()` and the fetch for a schema in `arrow_schema()` now start with an empty log. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
The row numbers reach R as doubles, and pasting them printed 100000 as `1e+05`. `format_coercion_rows()` now formats the first rows and the last two as whole numbers. The `coercions` field keeps them as numbers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
… 64 bits Through Arrow, a string or blob in an `int64` column is converted to a 64-bit integer. One that needs 64 bits made the column follow `bigint` in that fetch, but `note_integer()` only saw values stored as integers, so the next fetch went back to `integer`. Converted values are now noted too, so the column stays wide like after such an integer. The default path truncates these values to an `integer`, which the documentation now lists among the differences. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
The default path types the columns of a fetch of no rows from the next row, and warns when that row holds a value of another storage class. The Arrow path types the columns the same way but logs nothing, since the fetch returns no value. The documentation now lists this among the differences of the warnings, and the comparison of both paths spells it out, with a sequence where the default path warns on the fetch of no rows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…nt-tesla-mja103-schema Brings in the reworked layers below, at 4a4e580. The column builder keeps the kinds, the unit and the time zone of this branch on top of the state of #800: the storage class read once per row by `read_row()`, the bytes read once by `fetch_bytes()`, the open typing of data frame fetches, `wide_ints`, and the `null_type` reason. `append_integer()`, `append_string()` and `append_binary()` read the current row's value like #800 does, and `fetch_bytes()` also serves `large_utf8` and `large_binary`. `set_type()` and `init_array()` become const members, since the time types take the column's unit and time zone. A requested type freezes its column from the start, so `reopen()`, `peek_value()` and `conform_chunk()` leave it alone. `DbResult::set_arrow_schema()` keeps its `is_active()` check, which #800 dropped from the reads of a stream. The generated dependency files are those of #800, regenerated through `src/Makevars.deps`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…e converts exactly This branch converts integers and reals into a text column and text into a blob column without a warning, the default path warns for them. Since #800, `?"sqlite-arrow"` says that both paths warn on the same fetches apart from truncated reals, and a test compares them on a blob column that receives text. The documentation now names these silent conversions as a second exception, and that test puts a number into the blob column, which both paths report. A new test pins the difference for text and blob columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
The review found that a value in a column of the null type was reported as converted, although it becomes `NULL`. Since #800 such values have the reason `null_type`, worded as "dropped by the null type, NA", and this holds for a null type requested with `schema` too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…quested Since #800 the warning names a column's type when it is raised, from the kind of the column builder. Each value of another storage class into each requested type now checks that name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in the second round of the data frame path through Arrow (times as doubles in seconds, types carried across `dbBind()`, text cut at its first NUL, the arrays handed to R as a list, the busy guard of the data frame fetch) and the fixes of the Arrow interface since the last merge, among them NULL for times and timestamps out of range and for text that is not valid UTF-8. The direct warnings of the Arrow interface for values out of range and text that is not valid UTF-8 go to the coercion log, with the reasons `out_of_range` and `invalid_utf8`, and the members and functions that raised them are gone. In a text column, the data frame path cuts text at its first NUL and does not check it, and both paths check blobs, now with the ASCII fast path of the Arrow interface. For a time or timestamp, a value that can't be parsed is logged first, then the data frame path appends the seconds, and only a stream converts them to microseconds and checks their range. A data frame fetch selects its arrays before it discards the log of an earlier fetch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…he coercion warning The data frame path through Arrow now carries times and timestamps as doubles in seconds and starts a new binding from the types of the last one. Unparsable times and timestamps in seconds are reported once per fetch, on the same fetches as the default path, and values outside a day or beyond the microseconds keep their value. After a new binding, values converted to the carried type are reported with row numbers counted from the binding, also across several fetches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in arrow in Suggests, for the test that runs Arrow's full validation behind a skip. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…ning of a fetch The data frame section still said that such a blob becomes `NA` with a warning of its own, and the sentence on handlers of the warning of a chunk now says plainly that they get an error. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…nt-tesla-mja103-schema Brings in #800 at dc4776e, with #796 and #795 below it. The column builder takes #800's open typing of data frame fetches (`data_frame`, `storage_kind()`, `seconds_class()`, `carry_over()`, `get_kind()`, `discard_coercions()`) and keeps this branch's kinds, unit, time zone and `append_*()` functions. `append_string()` takes #800's NUL cut for text in a data frame and its UTF-8 check of text and blobs in a stream, for `utf8` and `large_utf8`; numbers into text stay silent here. `append_time()` replaces #795's time branch: it parses, then hands a data frame its seconds, then checks the range of the unit and the day, for decided and requested types alike. A requested type wins: a new `requested` flag keeps it out of the seconds storage of a data frame fetch and out of `carry_over()` after `dbBind()`. `DbResult::set_arrow_schema()` and `get_column_names()` take `BusyScope` like the other entry points. `arrow_df_column_ptype()` falls back to nanoarrow's prototype for the other formats that a requested type gives, `uint64` is an `integer64`, and `large_utf8` columns are copied like `utf8` before their array goes. The arrow-schema test reads the arrays of a data frame fetch from the new list of `result_fetch_arrow_df()`. The generated dependency files are unchanged, and NAMESPACE keeps the import that the development roxygen2 drops. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…ypes of data frame fetches Since #800, a data frame fetch through Arrow holds decided times and timestamps as seconds, and starts a new binding from the types of the last one. The merge lets a requested type take precedence over both. A requested `time32` and `timestamp` give their unit, time zone and time of day in a data frame, and a requested `int32` holds for every binding where the default path would carry text over. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…quested Since #800, a data frame fetch through Arrow converts its arrays by their formats, which the merge extends with nanoarrow's prototypes for the formats of requested types. The test fetches every requestable type through `dbFetch()`, in one array and in arrays of two rows, and checks the R values. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in `dbColumnInfo()` answered from the Arrow columns, `POSIXlt` written like `POSIXct`, the note on the cost of small fetches, and the CI hook for the large Arrow test. The comparison of both data frame paths keeps both layers: `fetch_sequence()` asks `dbColumnInfo()` before each fetch when asked to and counts the warnings of each fetch, those of `dbColumnInfo()` aside, and `expect_same_fetches()` checks data and warnings with and without it. The documentation of the data frame path keeps the sentence on `dbColumnInfo()` and the three differences. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…umnInfo()` The merge of the data frame path's `dbColumnInfo()` paired each data frame of `fetch_sequence()` with its answer, also when it was not asked, which changed the shape that the tests of the layers above read. The pair is now built only with `info = TRUE`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
Superseded: Accepted limitationsSuperseded by this comment. Two clean reviews of this pull request, at 64a83c3 and 4a4e580, are addressed up to dc4776e, and every High and Medium finding is fixed. The integration review of the whole stack at 071560ec found nothing that belongs to this layer: the row numbers beyond 32 bits in the warning (its finding 5) come from the row counter of #795. These remain:
Generated by Claude Code |
…legant-tesla-mja103-warnings Brings in the busy mark reset through `R_ExecWithCleanup()`, the checks of Arrow parameters, the 64-bit row counter and the UTF-16 text in binary columns. The row number of the coercion log keeps its cast, now redundant with the 64-bit counter. The result columns section follows the new order of the Arrow interface, where the sentences on text come after the paragraph on `chunk_size`, whose "therefore" refers to the conversion before it, and keeps the coercion warning: converted and dropped values, text in a binary column among the former, are reported once per chunk. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…F-16 database The merged test of the Arrow interface expected its direct mixed-type warning, which this branch reports as one coercion warning per chunk. It now checks that warning, with the converted strings in rows 2 and 3. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in the bytes of a blob in a `utf8` column kept as they are, also in a UTF-16 database. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…-16 database The merged test of the Arrow interface expected its direct warnings, which this branch reports as one coercion warning per chunk: the valid blobs as converted, in rows 2, 3 and 5, and the one with a NUL byte as not valid UTF-8, in row 4. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in the state of the Arrow test hooks kept in each result, set with `result_set_bytes_limits()` and read with `result_rethrown_unwinds()`. The new test helpers `set_bytes_limits()` and `fetch_with_bytes_limits()` replace `local_arrow_bytes_limits()` in `helper-arrow.R`, where this branch keeps the Arrow test helpers, instead of `test-arrow.R`. The merged tests keep the coercion warning: the held-back blob is checked in its warning, and the unwind tests expect "Mixed types". The data frame test of arrays cut short calls `set_bytes_limits()`, and `src/result.dd` no longer lists `CoercionLog.h`, which `result.cpp` no longer reaches. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in Arrow streams read safely on worker threads, with the "Threads" section of `?"sqlite-arrow"`, the scanner tests, the memory cleanup of the large tests with `helper-memory.R`, and the longjmp tests. The direct warnings of the Arrow interface stay gone, so their `rsqlite_warning()` calls go with them, and the parsers of dates and times keep reporting failures through `ok`. The default path's warning of an unparsable value goes through `rsqlite_warning()`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
Arrow streams are read on worker threads by arrow's scanner, Acero and `write_dataset()`, where R can't be called. Once a value had been logged, `warn_coercions()` built the entries as R lists and called `warn_coercion()` in R on that thread, which overflowed the C stack and hung the session. Off R's main thread it now builds the text of the warning in C++ from the logs, as R shows it without cli, and `rsqlite_warning()` fails the stream with it, like #795 does for the other warnings. On R's main thread the warning is unchanged. The worker-thread test of #795 expects this text, and a new test compares the error with the warning of the same rows on R's main thread. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…legant-tesla-mja103-warnings Brings in the atomic busy mark that records the thread holding a result, the atomic row count and completion, the parked results closed from the main-thread entry points, NaN tested without R, and the tests that read streams on a thread of their own. The date and time branches keep the coercion log of this branch and test for NaN with `std::isnan()`. The coercion logs are written and read inside the busy mark of their result, in `fetch_arrow()`, `arrow_schema()` and the data frame fetch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…on another thread The merged test expected the direct warnings of the Arrow interface, which this branch reports as one coercion warning per chunk, off R's main thread as the error of the stream. It now expects that text for the string in an integer column and for the unparsable date, and the coercion warning when the same date is read on R's main thread. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
Accepted limitationsTwo clean reviews of this pull request, at 64a83c3 and 4a4e580, and both integration reviews of the stack (first integration review, second integration review) are addressed up to 86a0342, which closes the review rounds for the stack. Every High and Medium finding is fixed; on a worker thread the coercion warning becomes the stream's error with the same text (c7327be), so this layer calls no R API there either. These remain:
Generated by Claude Code |
…legant-tesla-mja103-warnings Brings in the Arrow test fixtures moved into `helper-arrow.R`. `helper-arrow.R` keeps the helpers of this branch, `coercion_warnings()` among them, and `fetch_sequence()` there counts the warnings of each fetch, as it did in `test-arrow-df.R` on this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
`expect_same_fetches()` moves from the top of `test-arrow-df.R` into `helper-arrow.R`, next to `fetch_sequence()`, and gains a line saying what it is for. `pkgload::load_all()` sources that file, so every `test_that()` block now runs on its own after `load_all()`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
|
Marked as a draft, as decided: this pull request is the reference for the reworked Arrow stack, which carries its changes in smaller, separately reviewed pull requests (see the plan). So far: #855, #856, #857, #859 to #867 (GitHub stack 851 on #830 and #850), and #852, #853, #854 and #858 from Generated by Claude Code |
|
Closed as superseded, as decided: the Arrow work is rebuilt from Generated by Claude Code |
Stacked on #796 (base branch
claude/elegant-tesla-mja103-arrow-option), which is stacked on #795. Applies to the native Arrow path, and through #796 to data frames fetched withdbConnect(arrow = TRUE).Values that are not of their column's Arrow type were reported with one warning per column, raised in the middle of reading a row and naming only the first offending storage class. They are now logged per column with their 1-based row numbers in the result, and reported by one warning that lists every affected column: once per chunk for an Arrow stream and
dbFetchArrowChunk(), and once perdbFetch()for a data frame through Arrow, after its arrays have been conformed to the final types (a column logged asint64that becamedoublelater in the fetch is nameddouble). ThedbFetch()warning is raised from R once the data frame is built, outside #795's busy guard, so a handler can use the result; the warning of a chunk or schema request is raised inside the fetch, where a handler that uses that result gets #795's error.RSQLite_warning_coercionand carries the structured details in itscoercionsfield (column, type, and per storage class and reason the count and rows), so consumer packages and tests can inspect it without parsing the message.rows 2, 3, …, 19, …, 30, and 31. The C++ log keeps only the first 20 and the last 2 row numbers per column and reason, so memory stays bounded, also across the arrays of a data frame fetch. Row numbers are printed in full (row 100000, not1e+05); thecoercionsfield keeps them numeric; they restart with each execution afterdbBind().local_use_cli(format = TRUE, inline = FALSE), so column names with braces are safe), andcli::ansi_collapse()joins the rows. Without cli, rlang's own bullets and a plain join give the same text. cli was already in Suggests, so no new dependency.NULLand listed in the same warning with reasonunparsable. The default data frame path keeps its per-value warnings, untouched.out_of_rangeandinvalid_utf8, instead of one warning per column.utf8column that are not valid UTF-8 without NUL bytes become NULL (since feat: Implement the DBI Arrow interface natively #795) and are logged with reasoninvalid_utf8; on the data frame path text is cut at its first NUL and not checked, as on the default path, while blobs are checked as in a stream. This is the Arrow-path counterpart of fix: Validate blobs that are read into a text column #799, sharing the samesrc/utf8.hvalidator; with fix: Validate blobs that are read into a text column #799 merged, both data frame paths return the same values.NULLwithout a declared type, in a stream or in data frame fetches after a stream or chunk fixed the types) are dropped and listed with reasonnull_type, "dropped by the null type, NA".?"sqlite-arrow", together with how the data frame path differs from the default path, which warns on the same fetches but once per column.options(warn = 2)turns into an exit leaves the result usable: a data frame fetch through Arrow reopens its columns before warning, and the schema request of a stream keeps the first chunk before warning, so a retry returns the schema and every row.integer64(followingbigint) in later fetches too, as an integer of that size does; the default path truncates such a value tointeger, which?"sqlite-arrow"lists among the differences.test-arrow-df.Rspells this exception out.arrowargument todbConnect()to route data frames through Arrow #796's, moved totests/testthat/helper-arrow.Rso the newtest-arrow-coercion.Rcan use them. The comparison of both data frame paths intest-arrow-df.Rnow also checks that they warn on the same fetches.Review
Two clean-context reviews: the first (2026-09-27) found two Low issues, the second confirmed those fixes and found two Medium issues (a warning that exits a fetch left a NULL-only column null-typed, and a warning that exits a stream's schema request lost the first chunk) and four Low ones; all are fixed or documented. #796 is merged up to cbac340; the remaining limitations will be listed in an "Accepted limitations" comment after a final clean review of the whole stack.
On a worker thread, where R can't be called (arrow's scanner, Acero,
write_dataset()), the coercion warning becomes the error of the stream, with the warning's text as R shows it without cli followed by "(an error instead of a warning, …)", like the other warnings of #795 (c7327be); on R's main thread nothing changes.What remains is listed under Accepted limitations.
https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
Generated by Claude Code