% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tables.R
\name{table_write}
\alias{table_write}
\title{Write tabular results into a table buffer or sink}
\usage{
table_write(target, rows_or_shard_id, data, ...)
}
\arguments{
\item{target}{A \code{shard_table_buffer} or \code{shard_table_sink}.}

\item{rows_or_shard_id}{For buffers: row selector (idx_range or integer vector).
For sinks: shard id (integer).}

\item{data}{A data.frame or named list matching the schema columns.}

\item{...}{Reserved for future extensions.}
}
\value{
\code{NULL} (invisibly).
}
\description{
\code{table_write()} is the common write path for shard table outputs:
\itemize{
\item For fixed-size outputs, write into a \code{shard_table_buffer} using a row selector.
\item For variable-size outputs, write into a \code{shard_table_sink} using a shard id.
}
}
\examples{
\donttest{
s <- schema(x = float64(), y = int32())
tb <- table_buffer(s, nrow = 10L)
table_write(tb, idx_range(1, 5), data.frame(x = rnorm(5), y = 1:5))
}
}
