haohuaijin opened a new pull request, #11389: URL: https://github.com/apache/arrow-rs/pull/11389
# Which issue does this PR close? Relates to #10423. # Rationale for this change Add reproducible coverage for mixed mask/selector `RowSelection::intersection` and `union` before changing their implementation. This follows the recommendation in CONTRIBUTING.md to submit benchmark coverage separately so it can run on the automated benchmark runner. The inspected Arrow and DataFusion scan call sites combine selections covering the same row group, so valid operands have equal logical lengths, including skipped rows. See [Arrow's projected page-range intersection](https://github.com/apache/arrow-rs/blob/103ebe7548db35c37e8ff35fcb02438bcd182fa7/parquet/src/arrow/push_decoder/reader_builder/mod.rs#L932-L947), [DataFusion's page-pruning composition](https://github.com/apache/datafusion/blob/8248a579695b92b7ca94709eedd63a71689513ce/datafusion/datasource-parquet/src/page_filter.rs#L498-L505), and [DataFusion's row-group length validation](https://github.com/apache/datafusion/blob/8248a579695b92b7ca94709eedd63a71689513ce/datafusion/datasource-parquet/src/access_plan.rs#L569-L584). These benchmarks target that input shape; the public RowSelection API also supports unequal lengths. # What changes are included in this PR? Register a dedicated `row_selection_algebra` Criterion benchmark with 13 single-operation input pairs and a three-operation chain, each measured for intersection and union (28 cases total). Inputs cover alternating and random bitmaps, compact and sparse prefixes, fixed and variable page ranges with 10%/50%/90% selection probabilities, fragmented selectors, and nonzero bitmap offsets. Every pair has matching lengths, enforced outside timing, and mask RLE caches are not precomputed. Input preparation is excluded from timing; result allocation and destruction are included. Chain cases include all three operations and intermediate results. # Are these changes tested? All 28 benchmark cases execute successfully against the unchanged main implementation, and their input-length assertions pass. Formatting and benchmark-specific Clippy checks pass. Bit-by-bit reference checks also verified the fixture results and operation chains during benchmark development. # Are there any significant user-facing changes? None. AI assistance: benchmark code and this description were prepared with Codex. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
