(in source order).
LazyFrame.forEachBatch
void forEachBatch(scope bool delegate(ref DataFrame) consumer,
size_t batchSize = 65_536) @trustedConsumes the deferred frame batch-by-batch without accumulating the output: each pulled batch (the row-wise prefix applied, the limit bound honored) is handed to consumer; returning false stops pulling (the early-exit rule). When nothing ever arrives, the consumer sees one empty schema-carrying batch (a sink still writes its header). Blocking plans materialise through collect() first - disclosed by streamMode() - and are then iterated in batchSize batches.
Parameters
consumer | the batch sink; false stops the pull |
batchSize | the pull width (blocking-fallback iteration) |
Throws
DataFrameException on batchSize < 1 or source errors