Repository navigation
bench: add nested-column gather cases (#7080) - #7200
Open
HarshilMital wants to merge 1 commit into
Open
HarshilMital wants to merge 1 commit into
HarshilMital wants to merge 1 commit into
Conversation
Part of apache#7080. What's added: shuffle_gather_nested, the BenchRepartitioner place and place+gather harness under CometPartitioning::Hash (50 partitions, 8 x 8192 rows), over four nested shapes: List<Int64>, List<Struct<Int64, Utf8>>, Map<Utf8, Int64> and Struct<Int64, Utf8, Float64>. Each schema is an Int64 key plus four columns of the shape. List lengths vary 0-8 and map lengths 1-7 by row; every value is per-row and every batch is built separately. Code path: the row-level gather (interleave_record_batch) that a hash scatter forces on flush, on list and map offsets and their child arrays. The hash reads only the key, and the discarding writer keeps IPC and disk out, so place+gather minus place is the nested gather. 8 bench IDs. Reproduce on the VM (from native/): cargo bench -p datafusion-comet-shuffle --bench shuffle_writer -- 'shuffle_gather_nested' --save-baseline main Results: TODO (VM)
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?
Part of #7080.
Rationale for this change
Hash placement scatters rows, so the flush gathers each output partition back out a row at a time with
interleave_record_batch. For list and map columns that means rebuilding offsets and recursing into child arrays, but the existing gather fixtures have no list or map columns at all.What changes are included in this PR?
shuffle_gather_nested: the existingBenchRepartitionerplaceandplace+gatherharness, underCometPartitioning::Hash(50 partitions, 8 × 8192 rows), over four shapes:List<Int64>,List<Struct<Int64, Utf8>>,Map<Utf8, Int64>andStruct<Int64, Utf8, Float64>. Each schema is an Int64 key plus four columns of the shape. List lengths vary 0–8 and map lengths 1–7 by row; every value is per-row and every batch is built separately. The hash reads only the key and the discarding writer keeps IPC and disk out, soplace+gatherminusplaceis the nested gather. 8 bench IDs.Results
Machine: 8 vCPU Arm Neoverse-V2 (aarch64), 31 GiB RAM, rustc 1.99.1
Commit:
d53f78a. Median with Criterion's 95% interval.Reproduce from
native/:cargo bench -p datafusion-comet-shuffle --bench shuffle_writer -- 'shuffle_gather_nested' --save-baseline mainplaceplace+gatherGathering
List<Struct>andMap<Utf8, Int64>costs about 5× whatList<Int64>or a flat struct does. All intervals are within ±1%.How are these changes tested?
This PR only adds benchmark code under
native/shuffle/benches/; no production code changes.cargo fmt --all -- --checkandcargo clippy -p datafusion-comet-shuffle --all-targets -- -D warningspass.cargo bench -p datafusion-comet-shuffle --bench shuffle_writer --no-runbuilds.cargo bench -p datafusion-comet-shuffle --bench shuffle_writer -- --test 'shuffle_gather_nested'.