Repository navigation
Size the list layout split grid by row count - #10531
Merged
Merged
Conversation
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.
Summary
ListReaderplaces scan splits on a grid of outer rows, and the grid was fixed at 64 cells whatever the file size. The grid now grows with the row count: at least 64 cells, and enough that a cell covers at most about 8,192 rows. Files under about 512K rows are unchanged.How list splits work
register_splitsmust report split points in outer rows, but a list's natural boundaries are its element blocks, which are cut in element rows. It can't read the offsets at that point, so it estimates:Example: 800 outer rows, 4,000 elements in 5 blocks, an 8-cell grid:
Grid size (this PR):
cells = max(64, next_power_of_two(ceil(rows / 8192)))Results
Local runs, list layout ÷ develop (52a1d15): 3 interleaved rounds with rotating order, in-process iterations, Apple M5 Max (18 cores), warm page cache,
release_debugwithtarget-cpu=native. "grid 64" is the same list layout without this PR's reader change.vortexvortexvortexvortex-compactvortex-compactpolarsignals, DataFusion, `vortex` (20 iterations)
statpopgen, DataFusion, `vortex` (5 iterations)
statpopgen, DuckDB, `vortex` (5 iterations)
statpopgen, DataFusion, `vortex-compact` (5 iterations)
statpopgen, DuckDB, `vortex-compact` (5 iterations)
File sizes (list layout ÷ develop): statpopgen
vortex1.93 → 1.74 GB (0.90x), statpopgenvortex-compact1.003 → 0.977 GB (0.97x), polarsignals 718.8 → 714.2 MB (0.99x).