This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 0d2e1134 update documentation for tag main
0d2e1134 is described below
commit 0d2e113447b5a4e6af04b0612aae6fe7866db332
Author: GitHub Actions <[email protected]>
AuthorDate: Tue Oct 20 02:01:17 2026 +0000
update documentation for tag main
---
main/.doctrees/environment.pickle | Bin 1183513 -> 1183513 bytes
main/r/llms.txt | 2 +
main/r/pkgdown.yml | 2 +-
main/r/reference/function_array_stream.html | 134 ++++++++++++++++++++++++++++
main/r/reference/function_array_stream.md | 71 +++++++++++++++
main/r/reference/index.html | 7 ++
main/r/reference/index.md | 2 +
main/r/search.json | 2 +-
main/r/sitemap.xml | 1 +
9 files changed, 219 insertions(+), 2 deletions(-)
diff --git a/main/.doctrees/environment.pickle
b/main/.doctrees/environment.pickle
index ff018758..f3ee482d 100644
Binary files a/main/.doctrees/environment.pickle and
b/main/.doctrees/environment.pickle differ
diff --git a/main/r/llms.txt b/main/r/llms.txt
index a15cc832..1feffd45 100644
--- a/main/r/llms.txt
+++ b/main/r/llms.txt
@@ -291,6 +291,8 @@ objects into many arrow functions and vice versa.
Stream into an R vector
- [`example_ipc_stream()`](example_ipc_stream.md) : Example Arrow IPC
Data
+- [`function_array_stream()`](function_array_stream.md) : Create an
+ array stream from an R function
- [`infer_nanoarrow_ptype()`](infer_nanoarrow_ptype.md) : Infer an R
vector prototype
- [`infer_nanoarrow_ptype_extension()`](infer_nanoarrow_ptype_extension.md)
diff --git a/main/r/pkgdown.yml b/main/r/pkgdown.yml
index 05cc325f..9615fd98 100644
--- a/main/r/pkgdown.yml
+++ b/main/r/pkgdown.yml
@@ -2,4 +2,4 @@ pandoc: 3.7.0.2
pkgdown: 2.2.1
pkgdown_sha: ~
articles: {}
-last_built: 2026-10-19T03:35Z
+last_built: 2026-10-20T01:59Z
diff --git a/main/r/reference/function_array_stream.html
b/main/r/reference/function_array_stream.html
new file mode 100644
index 00000000..7aee8695
--- /dev/null
+++ b/main/r/reference/function_array_stream.html
@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta
charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta
name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no"><title>Create an array stream from an R function —
function_array_stream • nanoarrow</title><script
src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"><link
href="../de [...]
+object coercible by as_nanoarrow_array(), or NULL to indicate end of
+stream. The schema is required because it is available before the first
+array is requested. Neither construction nor schema access calls fun.
+After NULL or an error is returned, the callback is not called again."><meta
property="og:description" content="The function is called once for each
requested array. It should return an
+object coercible by as_nanoarrow_array(), or NULL to indicate end of
+stream. The schema is required because it is available before the first
+array is requested. Neither construction nor schema access calls fun.
+After NULL or an error is returned, the callback is not called
again."></head><body>
+ <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
+
+
+ <nav class="navbar navbar-expand-lg fixed-top bg-light"
data-bs-theme="light" aria-label="Site navigation"><div class="container">
+
+ <a class="navbar-brand me-2" href="../index.html">nanoarrow</a>
+
+ <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip"
data-bs-placement="bottom" title="">0.9.0.9000</small>
+
+
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false"
aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+
+ <div id="navbar" class="collapse navbar-collapse ms-3">
+ <ul class="navbar-nav me-auto"><li class="active nav-item"><a
class="nav-link" href="../reference/index.html">Reference</a></li>
+<li class="nav-item"><a class="nav-link"
href="../news/index.html">Changelog</a></li>
+ </ul><ul class="navbar-nav"><li class="nav-item"><form
class="form-inline" role="search">
+ <input class="form-control" type="search" name="search-input"
id="search-input" autocomplete="off" aria-label="Search site"
placeholder="Search for" data-search-index="../search.json"></form></li>
+<li class="nav-item"><a class="external-link nav-link"
href="https://github.com/apache/arrow-nanoarrow/" aria-label="GitHub"><span
class="fa fab fa-github fa-lg"></span></a></li>
+ </ul></div>
+
+
+ </div>
+</nav><div class="container template-reference-topic">
+<div class="row">
+ <main id="main" class="col-md-9"><div class="page-header">
+
+ <h1>Create an array stream from an R function</h1>
+ <small class="dont-index">Source: <a
href="https://github.com/apache/arrow-nanoarrow/blob/main/r/R/array-stream.R"
class="external-link"><code>R/array-stream.R</code></a></small>
+ <div class="d-none name"><code>function_array_stream.Rd</code></div>
+ </div>
+
+ <div class="ref-description section level2">
+ <p>The function is called once for each requested array. It should return
an
+object coercible by <code><a
href="as_nanoarrow_array.html">as_nanoarrow_array()</a></code>, or
<code>NULL</code> to indicate end of
+stream. The schema is required because it is available before the first
+array is requested. Neither construction nor schema access calls
<code>fun</code>.
+After <code>NULL</code> or an error is returned, the callback is not called
again.</p>
+ </div>
+
+ <div class="section level2">
+ <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor"
href="#ref-usage"></a></h2>
+ <div class="sourceCode"><pre class="sourceCode r"><code><span><span
class="fu">function_array_stream</span><span class="op">(</span><span
class="va">fun</span>, <span class="va">schema</span>, validate <span
class="op">=</span> <span class="cn">TRUE</span><span
class="op">)</span></span></code></pre></div>
+ </div>
+
+ <div class="section level2">
+ <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor"
href="#arguments"></a></h2>
+
+
+<dl><dt id="arg-fun">fun<a class="anchor" aria-label="anchor"
href="#arg-fun"></a></dt>
+<dd><p>A function called with no arguments to produce each array.</p></dd>
+
+
+<dt id="arg-schema">schema<a class="anchor" aria-label="anchor"
href="#arg-schema"></a></dt>
+<dd><p>A schema coercible by <code><a
href="as_nanoarrow_schema.html">as_nanoarrow_schema()</a></code>, used to coerce
+and validate each result.</p></dd>
+
+
+<dt id="arg-validate">validate<a class="anchor" aria-label="anchor"
href="#arg-validate"></a></dt>
+<dd><p>A single <code>TRUE</code> or <code>FALSE</code>. Use
<code>FALSE</code> to skip validation
+within the callback. The stream's <code>get_next()</code> method can validate
the
+returned array independently.</p></dd>
+
+</dl></div>
+ <div class="section level2">
+ <h2 id="value">Value<a class="anchor" aria-label="anchor"
href="#value"></a></h2>
+ <p>An <a
href="as_nanoarrow_array_stream.html">nanoarrow_array_stream</a></p>
+ </div>
+ <div class="section level2">
+ <h2 id="details">Details<a class="anchor" aria-label="anchor"
href="#details"></a></h2>
+ <p>Errors and interrupts raised by <code>fun</code> are converted to
stream errors.
+Evaluation is also isolated in a top-level R context so other non-local exits
+(for example, invoking an <code>abort</code> restart) cannot escape through
the C stream
+interface. Calling handlers in the caller are therefore not applied to
+callback evaluation. The callback is evaluated only on R's main thread.
+Warnings are handled in this isolated context, unless handled within
<code>fun</code>.
+<code>fun</code> must not release the stream (or call its methods) while it is
being
+evaluated. The stream retains <code>fun</code> until it is released;
explicitly release
+streams when <code>fun</code> or its environment refers to the stream
itself.</p>
+ </div>
+
+ <div class="section level2">
+ <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor"
href="#ref-examples"></a></h2>
+ <div class="sourceCode"><pre class="sourceCode r"><code><span
class="r-in"><span><span class="va">i</span> <span class="op"><-</span>
<span class="fl">0L</span></span></span>
+<span class="r-in"><span><span class="va">stream</span> <span
class="op"><-</span> <span class="fu">function_array_stream</span><span
class="op">(</span></span></span>
+<span class="r-in"><span> <span class="kw">function</span><span
class="op">(</span><span class="op">)</span> <span
class="op">{</span></span></span>
+<span class="r-in"><span> <span class="va">i</span> <span
class="op"><<-</span> <span class="va">i</span> <span class="op">+</span>
<span class="fl">1L</span></span></span>
+<span class="r-in"><span> <span class="kw">if</span> <span
class="op">(</span><span class="va">i</span> <span class="op">></span> <span
class="fl">2L</span><span class="op">)</span> <span class="cn">NULL</span>
<span class="kw">else</span> <span class="va">mtcars</span><span
class="op">[</span><span class="va">i</span>, , drop <span class="op">=</span>
<span class="cn">FALSE</span><span class="op">]</span></span></span>
+<span class="r-in"><span> <span class="op">}</span>,</span></span>
+<span class="r-in"><span> <span class="fu"><a
href="as_nanoarrow_schema.html">infer_nanoarrow_schema</a></span><span
class="op">(</span><span class="va">mtcars</span><span
class="op">)</span></span></span>
+<span class="r-in"><span><span class="op">)</span></span></span>
+<span class="r-in"><span><span class="fu"><a
href="https://rdrr.io/r/base/as.data.frame.html"
class="external-link">as.data.frame</a></span><span class="op">(</span><span
class="va">stream</span><span class="op">$</span><span
class="fu">get_next</span><span class="op">(</span><span
class="op">)</span><span class="op">)</span></span></span>
+<span class="r-out co"><span class="r-pr">#></span> mpg cyl disp hp drat
wt qsec vs am gear carb</span>
+<span class="r-out co"><span class="r-pr">#></span> 1 21 6 160 110 3.9
2.62 16.46 0 1 4 4</span>
+<span class="r-in"><span><span class="fu"><a
href="https://rdrr.io/r/base/as.data.frame.html"
class="external-link">as.data.frame</a></span><span class="op">(</span><span
class="va">stream</span><span class="op">$</span><span
class="fu">get_next</span><span class="op">(</span><span
class="op">)</span><span class="op">)</span></span></span>
+<span class="r-out co"><span class="r-pr">#></span> mpg cyl disp hp drat
wt qsec vs am gear carb</span>
+<span class="r-out co"><span class="r-pr">#></span> 1 21 6 160 110 3.9
2.875 17.02 0 1 4 4</span>
+<span class="r-in"><span><span class="va">stream</span><span
class="op">$</span><span class="fu">get_next</span><span
class="op">(</span><span class="op">)</span></span></span>
+<span class="r-out co"><span class="r-pr">#></span> NULL</span>
+<span class="r-in"><span><span class="va">stream</span><span
class="op">$</span><span class="fu">release</span><span
class="op">(</span><span class="op">)</span></span></span>
+<span class="r-in"><span></span></span>
+</code></pre></div>
+ </div>
+ </main><aside class="col-md-3"><nav id="toc" aria-label="Table of
contents"><h2>On this page</h2>
+ </nav></aside></div>
+
+
+ <footer><div class="pkgdown-footer-left">
+ <p>Developed by Dewey Dunnington, Apache Arrow.</p>
+</div>
+
+<div class="pkgdown-footer-right">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/"
class="external-link">pkgdown</a> 2.2.1.</p>
+</div>
+
+ </footer></div>
+
+
+
+
+
+ </body></html>
+
diff --git a/main/r/reference/function_array_stream.md
b/main/r/reference/function_array_stream.md
new file mode 100644
index 00000000..c504d281
--- /dev/null
+++ b/main/r/reference/function_array_stream.md
@@ -0,0 +1,71 @@
+# Create an array stream from an R function
+
+The function is called once for each requested array. It should return
+an object coercible by [`as_nanoarrow_array()`](as_nanoarrow_array.md),
+or `NULL` to indicate end of stream. The schema is required because it
+is available before the first array is requested. Neither construction
+nor schema access calls `fun`. After `NULL` or an error is returned, the
+callback is not called again.
+
+## Usage
+
+``` r
+function_array_stream(fun, schema, validate = TRUE)
+```
+
+## Arguments
+
+- fun:
+
+ A function called with no arguments to produce each array.
+
+- schema:
+
+ A schema coercible by
+ [`as_nanoarrow_schema()`](as_nanoarrow_schema.md), used to coerce and
+ validate each result.
+
+- validate:
+
+ A single `TRUE` or `FALSE`. Use `FALSE` to skip validation within the
+ callback. The stream's `get_next()` method can validate the returned
+ array independently.
+
+## Value
+
+An [nanoarrow_array_stream](as_nanoarrow_array_stream.md)
+
+## Details
+
+Errors and interrupts raised by `fun` are converted to stream errors.
+Evaluation is also isolated in a top-level R context so other non-local
+exits (for example, invoking an `abort` restart) cannot escape through
+the C stream interface. Calling handlers in the caller are therefore not
+applied to callback evaluation. The callback is evaluated only on R's
+main thread. Warnings are handled in this isolated context, unless
+handled within `fun`. `fun` must not release the stream (or call its
+methods) while it is being evaluated. The stream retains `fun` until it
+is released; explicitly release streams when `fun` or its environment
+refers to the stream itself.
+
+## Examples
+
+``` r
+i <- 0L
+stream <- function_array_stream(
+ function() {
+ i <<- i + 1L
+ if (i > 2L) NULL else mtcars[i, , drop = FALSE]
+ },
+ infer_nanoarrow_schema(mtcars)
+)
+as.data.frame(stream$get_next())
+#> mpg cyl disp hp drat wt qsec vs am gear carb
+#> 1 21 6 160 110 3.9 2.62 16.46 0 1 4 4
+as.data.frame(stream$get_next())
+#> mpg cyl disp hp drat wt qsec vs am gear carb
+#> 1 21 6 160 110 3.9 2.875 17.02 0 1 4 4
+stream$get_next()
+#> NULL
+stream$release()
+```
diff --git a/main/r/reference/index.html b/main/r/reference/index.html
index 81146784..c6a04ac6 100644
--- a/main/r/reference/index.html
+++ b/main/r/reference/index.html
@@ -118,6 +118,13 @@
</dt>
<dd>Example Arrow IPC Data</dd>
+ <dt>
+
+ <code><a
href="function_array_stream.html">function_array_stream()</a></code>
+
+ </dt>
+ <dd>Create an array stream from an R function</dd>
+
<dt>
<code><a
href="infer_nanoarrow_ptype.html">infer_nanoarrow_ptype()</a></code>
diff --git a/main/r/reference/index.md b/main/r/reference/index.md
index ad5f4fff..a413b993 100644
--- a/main/r/reference/index.md
+++ b/main/r/reference/index.md
@@ -32,6 +32,8 @@
Stream into an R vector
- [`example_ipc_stream()`](example_ipc_stream.md) : Example Arrow IPC
Data
+- [`function_array_stream()`](function_array_stream.md) : Create an
+ array stream from an R function
- [`infer_nanoarrow_ptype()`](infer_nanoarrow_ptype.md) : Infer an R
vector prototype
- [`infer_nanoarrow_ptype_extension()`](infer_nanoarrow_ptype_extension.md)
diff --git a/main/r/search.json b/main/r/search.json
index 743087ed..161a256c 100644
--- a/main/r/search.json
+++ b/main/r/search.json
@@ -1 +1 @@
-[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache
License","title":"Apache License","text":"Version 2.0, January 2004
<http://www.apache.org/licenses/>","code":""},{"path":[]},{"path":"/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms
and Conditions for use, reproduction, and distribution","what":"1.
Definitions","title":"Apache License","text":"“License” shall mean terms
conditions use, reproduction, distribution defined Sections [...]
+[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache
License","title":"Apache License","text":"Version 2.0, January 2004
<http://www.apache.org/licenses/>","code":""},{"path":[]},{"path":"/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms
and Conditions for use, reproduction, and distribution","what":"1.
Definitions","title":"Apache License","text":"“License” shall mean terms
conditions use, reproduction, distribution defined Sections [...]
diff --git a/main/r/sitemap.xml b/main/r/sitemap.xml
index 956fa30a..f5227a24 100644
--- a/main/r/sitemap.xml
+++ b/main/r/sitemap.xml
@@ -15,6 +15,7 @@
<url><loc>/reference/convert_array.html</loc></url>
<url><loc>/reference/convert_array_stream.html</loc></url>
<url><loc>/reference/example_ipc_stream.html</loc></url>
+<url><loc>/reference/function_array_stream.html</loc></url>
<url><loc>/reference/index.html</loc></url>
<url><loc>/reference/infer_nanoarrow_ptype.html</loc></url>
<url><loc>/reference/infer_nanoarrow_ptype_extension.html</loc></url>