perf(parquet): read the inner mask at absolute offsets in dense RowSelection::and_then #11554
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 267 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.334
Real PR Conversation Timeline
1 comments
"Review active on #11554"
general
weight: 0.35
alamb
Which issue does this PR close?
Rationale for this change
and_then_dense_masksfrom #10968 keeps the not yet consumed bits ofotherin au128window and refills it in awhileloop, and withoutpdepeach word goes through the bit loops ofbit_util::expand. Both cost per word even where the masks come in whole words, as they do after row group and page filters.What changes are included in this PR?
otherfrom a 16-byte window at the running bit position (BitReader), so a word's read depends only on the position and consecutive words overlap. The main loop ends at the first read that would cross the end ofother; the remaining words read from a zero-padded copy of the last 16 bytes. Output words go straight into a zeroed buffer.bmi2, a mask word that is all set takes the next 64 bits as they are, and taken bits that are all clear or all set give 0 or the mask word, skippingexpand. Withbmi2the plainpdepstays, the branches cost more than it.Are these changes tested?
test_dense_mask_and_then_mask_shapescomparesand_then_dense_maskswith a bit-by-bit reference over lengths from 1 to 8195, random offsets of both masks, random bits around the inner slice (so a read past either end shows), and random, run-shaped, all-set and sparse outer masks against random, run-shaped and constant inner masks. The existing tests pass with and withoutbmi2.row_selectorbenches on GitHub runners, main / this PR, median of three interleaved rounds, dense path only (the others are unchanged):| case | Neoverse-N2 | Apple M1 | EPYC 7763 | EPYC 9V74, x86-64-v3 |
|---|---|---|---|---|
| clustered, outer 75 to 99 % | 1.29 to 1.59x | 1.33 to 1.65x | 1.52 to 1.96x | 1.52 to 1.81x |
| random, outer 99 % | 1.20 to 1.43x | 1.15 to 1.47x | 1.51 to 1.68x | 1.53 to 1.72x |
| random, inner 99 % | 1.69 to 1.74x | 1.68 to 1.95x | 1.77 to 1.81x | 1.45 to 1.48x |
| random, outer 75 to 80 %, inner 5 to 10 % | 1.04 to 1.07x | 1.01 to 1.17x | 1.10 to 1.14x | 1.43 to 1.49x |
Are there any significant user-facing changes?
No.