% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/block.R
\name{block_lookup}
\alias{block_lookup}
\title{Probe a materialized block by column value}
\usage{
block_lookup(block, column, keys, ci = FALSE)
}
\arguments{
\item{block}{A \code{vectra_block} from \code{\link[=materialize]{materialize()}}.}

\item{column}{Character scalar. Name of the string column to match against.}

\item{keys}{Character vector. Query values to look up.}

\item{ci}{Logical. Case-insensitive matching (default \code{FALSE}).}
}
\value{
A data.frame with column \code{query_idx} (1-based position in \code{keys})
plus all columns from the block, for each (query, block_row) match pair.
}
\description{
Performs a hash lookup on a string column of a materialized block.
Returns all rows where the column value matches one of the query keys.
Hash indices are built lazily on first use and cached for subsequent calls.
}
\examples{
\donttest{
f <- tempfile(fileext = ".vtr")
df <- data.frame(taxonID = 1:2,
                 canonicalName = c("Quercus robur", "Pinus sylvestris"))
write_vtr(df, f)
blk <- materialize(tbl(f))
hits <- block_lookup(blk, "canonicalName", c("Quercus robur"))
ci_hits <- block_lookup(blk, "canonicalName", c("quercus robur"), ci = TRUE)
unlink(f)
}

}
