% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/block.R
\name{materialize}
\alias{materialize}
\title{Materialize a vectra node into a reusable in-memory block}
\usage{
materialize(.data)
}
\arguments{
\item{.data}{A \code{vectra_node} (consumed; cannot be used after this call).}
}
\value{
A \code{vectra_block} object (external pointer to C-level ColumnBlock).
}
\description{
Consumes a vectra node (pulling all batches) and stores the result as a
persistent columnar block in memory.  Unlike nodes, blocks can be probed
repeatedly via \code{\link[=block_lookup]{block_lookup()}} without re-scanning.
}
\examples{
\donttest{
f <- tempfile(fileext = ".vtr")
df <- data.frame(taxonID = 1:3,
                 canonicalName = c("Quercus robur", "Pinus sylvestris",
                                   "Fagus sylvatica"))
write_vtr(df, f)
blk <- materialize(tbl(f) |> select(taxonID, canonicalName))
hits <- block_lookup(blk, "canonicalName",
                     c("Quercus robur", "Pinus sylvestris"))
unlink(f)
}

}
