PR1: add ScanOrder enum to ArrowScan.to_record_batches#1
Draft
sumedhsakdeo wants to merge 1 commit intofix/arrow-scan-batch-size-3036from
Draft
PR1: add ScanOrder enum to ArrowScan.to_record_batches#1sumedhsakdeo wants to merge 1 commit intofix/arrow-scan-batch-size-3036from
sumedhsakdeo wants to merge 1 commit intofix/arrow-scan-batch-size-3036from
Conversation
This was referenced Feb 14, 2026
55d68b8 to
444549f
Compare
8f8a2d2 to
5ab0fd1
Compare
07287b6 to
a0a29c8
Compare
Introduce ScanOrder.TASK (default) and ScanOrder.ARRIVAL to control batch ordering. TASK materializes each file before yielding; ARRIVAL yields batches as produced for lower memory usage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a0a29c8 to
2474b12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of apache#3036
Summary
ScanOrderenum (TASK,ARRIVAL) to control batch orderingScanOrder.TASK(default): existing behavior unchanged —executor.map+list(), files materialized before yieldingScanOrder.ARRIVAL: yields batches as PyArrow produces them, one file at a time, without materializing entire files into memoryOrdering semantics
ScanOrder.TASK(default)ScanOrder.ARRIVALPR Stack
This is PR 1 of 3 for apache#3036:
batch_sizeforwardingScanOrderenum — stop materializing entire filesconcurrent_files— bounded concurrent reads in arrival orderAre these changes tested?
Yes —
test_task_order_produces_same_results,test_arrival_order_yields_all_batches,test_arrival_order_with_limit,test_arrival_order_file_ordering_preserved, positional delete tests for both modesAre there any user-facing changes?
Yes — new
orderparameter (ScanOrderenum) onto_arrow_batch_reader()and newScanOrderclass exported frompyiceberg.table.This addresses the OOM issue in apache#3036 for single-file-at-a-time streaming.