bench(parquet): cover DELTA_BYTE_ARRAY large values in the arrow_writer benchmark - #10512
Open
adriangb wants to merge 1 commit into
Open
bench(parquet): cover DELTA_BYTE_ARRAY large values in the arrow_writer benchmark#10512adriangb wants to merge 1 commit into
adriangb wants to merge 1 commit into
Conversation
…er benchmark No existing benchmark writes DELTA_BYTE_ARRAY through the writer: the arrow_writer property matrix varies writer version, compression, bloom filters, and CDC, all on the default encoding, and encoding.rs benches encoders in isolation. Add shared-prefix and distinct large-string batches (128 rows x 2 MiB, so a single value exceeds the default 1 MiB page limit) run under plain and delta_byte_array properties with the dictionary disabled. The delta-vs-plain gap on identical data separates inherent encoding cost from writer overhead in the byte-budget sub-batching regime. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Which issue does this PR close?
Rationale for this change
No existing benchmark writes
DELTA_BYTE_ARRAYthrough the writer: thearrow_writerproperty matrix varies writer version, compression, bloom filters, and CDC, all on the default encoding, andencoding.rsbenches encoders in isolation.That gap matters for the large-value write path specifically: the byte-budget sub-batching in
write_batch_internal(#9972) measures raw payload bytes, and page-boundary behavior interacts with the encoding's cross-value state (#10489, #10505). None of that is visible to any current benchmark. #10511 tracks whether making the byte budget encoded-size-aware is worthwhile; these benchmarks are the measurement for that question.What changes are included in this PR?
Two new batches and one new bench group in
parquet/benches/arrow_writer.rs:large_string_shared_prefix: 128 rows x 2 MiB, long common prefix with a short distinct suffix (the caseDELTA_BYTE_ARRAYexists for)large_string_distinct: same shape, values differing from byte 0 (the adversarial case, prefix length ~0)Values are sized so one value alone exceeds the default 1 MiB page limit, the regime of #10489. Each batch runs under
plainanddelta_byte_arrayproperties (dictionary disabled), so the delta-vs-plain gap on identical data separates inherent encoding cost from writer overhead.Results on an Apple M-series laptop, current
main:plaindelta_byte_arraylarge_string_shared_prefixlarge_string_distinctNote these numbers shift when #10505 lands, in both directions: shared-prefix delta gets slower in CPU time because the encoder starts doing real prefix comparisons instead of degenerating to per-page
PLAIN(while the output shrinks ~128x), and distinct delta gets faster from halving the page count. That sensitivity is the point of having the benchmark.Are these changes tested?
The change is itself a benchmark; it compiles and runs under
cargo bench -p parquet --bench arrow_writer.Are there any user-facing changes?
No.
🤖 Generated with Claude Code