const PREDICATE_BATCH_ROWS: usize = 4096;Expand description
Rows accumulated before the residual predicates are evaluated over one record.
A predicate pass is dominated by per-call setup (Arc refcount traffic, DataType clones and
the filtered RecordBatch allocation) rather than by per-row comparison, and one ScanBatch
carries the rows of a single series. Buffering up to this many rows and evaluating the
predicates once per group pays that setup once per group of series instead of once per series.
A record that alone reaches this many rows is not concatenated with its neighbours: it heads its own group and is taken unchanged. A smaller record can still push a group past the threshold, so a group holds fewer than this many rows plus one such record’s rows, and both the buffered and the concatenated arrays are alive while it is built. The value is a tuning choice, not a memory bound; it also does not bound the bytes, since a record’s rows are of variable width.