Repository navigation
bench(parquet): cover sub-page value sizes, small page limits, and dictionary fallback - #10836
Merged
Jefffrey merged 1 commit intoAug 26, 2026
Merged
Conversation
…ctionary fallback The column writer splits a chunk into mini-batches when its values do not all fit the page byte budget, and on a nullable column how wide those windows are depends on the ratio between the value size and `data_page_size_limit`. `arrow_writer` covers the two ends of that range and neither middle. Values are either ~1 KiB (`small_string_*`, many to a page) or 2 MiB against the 1 MiB default (`large_string_*`, one value overrunning a page); the limit itself is never moved; and every `DELTA_BYTE_ARRAY` case pins the encoding with `set_dictionary_enabled(false)`, so the encoder is DBA from the first value. Three shapes are added, in a `writer_page_windows` target rather than `arrow_writer` — that suite already runs long enough to be split across jobs, and these are heavy. * `subpage_*`: 128 KiB and 512 KiB values against the 1 MiB default, where several values share a page budget. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only, so the distinct case — where deduplication saves nothing and a narrower window is not paid back — is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement in one and not the other is attributable. * `small_page_limit_*`: 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. This reaches a one-value window with far less encoding work per value to amortise the per-mini-batch overhead against than multi-MiB values do. * `dictionary_fallback_*`: a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, which is how byte-array columns are written in practice and changes the writer's windowing part-way through a column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, so the pair isolates the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout. `PLAIN` does not compress against the previous value, so it is insensitive to where a page boundary falls and serves as the control for whether a movement is windowing or the machine. Co-Authored-By: Claude Opus 5 <[email protected]>
adriangb
marked this pull request as ready for review
August 25, 2026 12:47
Contributor
Author
Contributor
Author
|
Thanks! Reminder that I can't merge PRs here so will wait for you or Andrew. |
Contributor
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Aug 28, 2026
…ctionary fallback (apache#10836) Adds writer benchmarks for three shapes that drive **mini-batch windowing** and that `arrow_writer` does not reach. When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and `data_page_size_limit` — and the existing suite only samples the two ends of that range. ## What is uncovered today | | `arrow_writer` | gap | | --- | --- | --- | | value size | ~1 KiB (`small_string_*`) or 2 MiB against the 1 MiB default (`large_string_*`) | nothing in between, where *several* values share a page budget | | `data_page_size_limit` | always the 1 MiB default | a smaller limit reaches a one-value window with far less encoding work per value | | how DBA is reached | always pinned via `set_dictionary_enabled(false)` | dictionary spilling into `DELTA_BYTE_ARRAY`, which is how byte-array columns are actually written | ## What is added * **`subpage_*`** — 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only; the *distinct* case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that. * **`small_page_limit_*`** — 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. * **`dictionary_fallback_*`** — a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, so the windowing changes part-way through the column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, isolating the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout: `PLAIN` does not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine. ## Notes New `writer_page_windows` bench target rather than adding to `arrow_writer` — that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes). Benchmarks only; no library code is touched. Motivated by apache#10538 / apache#10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects. Co-authored-by: Claude Opus 5 <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 2, 2026
…ctionary fallback (apache#10836) Adds writer benchmarks for three shapes that drive **mini-batch windowing** and that `arrow_writer` does not reach. When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and `data_page_size_limit` — and the existing suite only samples the two ends of that range. ## What is uncovered today | | `arrow_writer` | gap | | --- | --- | --- | | value size | ~1 KiB (`small_string_*`) or 2 MiB against the 1 MiB default (`large_string_*`) | nothing in between, where *several* values share a page budget | | `data_page_size_limit` | always the 1 MiB default | a smaller limit reaches a one-value window with far less encoding work per value | | how DBA is reached | always pinned via `set_dictionary_enabled(false)` | dictionary spilling into `DELTA_BYTE_ARRAY`, which is how byte-array columns are actually written | ## What is added * **`subpage_*`** — 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only; the *distinct* case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that. * **`small_page_limit_*`** — 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. * **`dictionary_fallback_*`** — a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, so the windowing changes part-way through the column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, isolating the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout: `PLAIN` does not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine. ## Notes New `writer_page_windows` bench target rather than adding to `arrow_writer` — that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes). Benchmarks only; no library code is touched. Motivated by apache#10538 / apache#10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects. Co-authored-by: Claude Opus 5 <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 18, 2026
…ctionary fallback (apache#10836) Adds writer benchmarks for three shapes that drive **mini-batch windowing** and that `arrow_writer` does not reach. When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and `data_page_size_limit` — and the existing suite only samples the two ends of that range. ## What is uncovered today | | `arrow_writer` | gap | | --- | --- | --- | | value size | ~1 KiB (`small_string_*`) or 2 MiB against the 1 MiB default (`large_string_*`) | nothing in between, where *several* values share a page budget | | `data_page_size_limit` | always the 1 MiB default | a smaller limit reaches a one-value window with far less encoding work per value | | how DBA is reached | always pinned via `set_dictionary_enabled(false)` | dictionary spilling into `DELTA_BYTE_ARRAY`, which is how byte-array columns are actually written | ## What is added * **`subpage_*`** — 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only; the *distinct* case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that. * **`small_page_limit_*`** — 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. * **`dictionary_fallback_*`** — a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, so the windowing changes part-way through the column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, isolating the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout: `PLAIN` does not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine. ## Notes New `writer_page_windows` bench target rather than adding to `arrow_writer` — that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes). Benchmarks only; no library code is touched. Motivated by apache#10538 / apache#10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects. Co-authored-by: Claude Opus 5 <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 21, 2026
…ctionary fallback (apache#10836) Adds writer benchmarks for three shapes that drive **mini-batch windowing** and that `arrow_writer` does not reach. When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and `data_page_size_limit` — and the existing suite only samples the two ends of that range. ## What is uncovered today | | `arrow_writer` | gap | | --- | --- | --- | | value size | ~1 KiB (`small_string_*`) or 2 MiB against the 1 MiB default (`large_string_*`) | nothing in between, where *several* values share a page budget | | `data_page_size_limit` | always the 1 MiB default | a smaller limit reaches a one-value window with far less encoding work per value | | how DBA is reached | always pinned via `set_dictionary_enabled(false)` | dictionary spilling into `DELTA_BYTE_ARRAY`, which is how byte-array columns are actually written | ## What is added * **`subpage_*`** — 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only; the *distinct* case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that. * **`small_page_limit_*`** — 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. * **`dictionary_fallback_*`** — a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, so the windowing changes part-way through the column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, isolating the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout: `PLAIN` does not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine. ## Notes New `writer_page_windows` bench target rather than adding to `arrow_writer` — that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes). Benchmarks only; no library code is touched. Motivated by apache#10538 / apache#10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects. Co-authored-by: Claude Opus 5 <[email protected]>
Rich-T-kid
pushed a commit
to Rich-T-kid/arrow-rs
that referenced
this pull request
Sep 25, 2026
…ctionary fallback (apache#10836) Adds writer benchmarks for three shapes that drive **mini-batch windowing** and that `arrow_writer` does not reach. When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and `data_page_size_limit` — and the existing suite only samples the two ends of that range. ## What is uncovered today | | `arrow_writer` | gap | | --- | --- | --- | | value size | ~1 KiB (`small_string_*`) or 2 MiB against the 1 MiB default (`large_string_*`) | nothing in between, where *several* values share a page budget | | `data_page_size_limit` | always the 1 MiB default | a smaller limit reaches a one-value window with far less encoding work per value | | how DBA is reached | always pinned via `set_dictionary_enabled(false)` | dictionary spilling into `DELTA_BYTE_ARRAY`, which is how byte-array columns are actually written | ## What is added * **`subpage_*`** — 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size, `medium_string_shared_prefix_nullable`, is shared-prefix only; the *distinct* case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that. * **`small_page_limit_*`** — 64 KiB values against a 64 KiB `data_page_size_limit`, a realistic setting for selective reads. * **`dictionary_fallback_*`** — a column that starts dictionary-encoded and becomes `DELTA_BYTE_ARRAY` only when the dictionary spills, so the windowing changes part-way through the column. `pinned_delta_byte_array` writes the same data with the dictionary disabled, isolating the dictionary phase and the transition. `plain` variants accompany the `delta_byte_array` ones throughout: `PLAIN` does not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine. ## Notes New `writer_page_windows` bench target rather than adding to `arrow_writer` — that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes). Benchmarks only; no library code is touched. Motivated by apache#10538 / apache#10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects. Co-authored-by: Claude Opus 5 <[email protected]>
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.
Adds writer benchmarks for three shapes that drive mini-batch windowing and that
arrow_writerdoes not reach.When a chunk's values do not all fit in the page byte budget, the column writer splits the chunk into mini-batches. On a nullable column, how wide those windows are depends on the ratio between the value size and
data_page_size_limit— and the existing suite only samples the two ends of that range.What is uncovered today
arrow_writersmall_string_*) or 2 MiB against the 1 MiB default (large_string_*)data_page_size_limitset_dictionary_enabled(false)DELTA_BYTE_ARRAY, which is how byte-array columns are actually writtenWhat is added
subpage_*— 128 KiB and 512 KiB values against the 1 MiB default. The existing case at this size,medium_string_shared_prefix_nullable, is shared-prefix only; the distinct case, where deduplication saves nothing and a narrower window is not paid back, is uncovered. A shared-prefix counterpart at 128 KiB varies only the prefix, so a movement present in one and absent in the other is attributable to that.small_page_limit_*— 64 KiB values against a 64 KiBdata_page_size_limit, a realistic setting for selective reads.dictionary_fallback_*— a column that starts dictionary-encoded and becomesDELTA_BYTE_ARRAYonly when the dictionary spills, so the windowing changes part-way through the column.pinned_delta_byte_arraywrites the same data with the dictionary disabled, isolating the dictionary phase and the transition.plainvariants accompany thedelta_byte_arrayones throughout:PLAINdoes not compress a value against its predecessor, so it is insensitive to where a page boundary falls and acts as the control for whether a movement is windowing or the machine.Notes
New
writer_page_windowsbench target rather than adding toarrow_writer— that suite is already long enough that a full run has to be split across jobs, and these are heavy (64 MiB written per iteration, sized so times are comparable across value sizes).Benchmarks only; no library code is touched.
Motivated by #10538 / #10554, where these shapes came up as unmeasured. Landing them separately means both sides of that comparison have them, so the change can be measured on the shapes it actually affects.