← Back to Pull requests

perf(exec): Probe consecutive equal grouping keys once on NVIDIA Vera #142

Closed
unknown closed this pull request without merging on Nov 23, 2026 09:49 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 15:20 UTC
Author

This draft targets dense inputs with four to sixteen integer and string grouping keys on NVIDIA Vera. NEON compares adjacent string views. When long strings use independent buffers, SVE verifies up to 64 bytes of content. Equal keys share the first row’s hash-table hit. SVE fills the hit pointers for the remaining rows. Aggregates and filters consume every input row.

The sampled NDS Q4 operators used eight flat keys. About 87.6% of adjacent rows had equal key values. The independent executor-level check counted 13,345,983 avoided hash-table probes out of 15,581,296 sampled rows.

Vera SF1000 focused SQL results

The matched reference and candidate both use the preceding four-change package with GroupingSet rebuilt with the same release flags and without PGO for that object. Each of the twelve runs used 42 executors with eight slots. The second block reversed the run order. All 42 query results matched.

| Scope | Matched reference | Candidate | Elapsed-time reduction |
|---|---:|---:|---:|
| NDS Q4 | 4.636 s | 4.096 s | +11.64% |
| Four selected NDS queries | 26.451 s | 26.578 s | −0.48% |
| Three selected NDS-H queries | 19.274 s | 20.570 s | −6.73% |

Q4 improved by 0.702 s and 0.378 s in the two blocks. The task CPU summed across stages containing the eight-key aggregation fell from 747.0 to 628.9 seconds and from 768.7 to 623.5 seconds. The selected NDS-H queries showed zero accepted batches in the sampled operators. Q18 took longer in both blocks. Full-suite results against both references are linked below. The broader regressions remain open for review.

The proposed GroupingSet object passed eleven aggregation tests on Vera. The added DuckDB comparison covers dictionary indices, wrapper and base NULLs, independently stored long strings, a changing last byte around the 16-byte and 64-byte boundaries, irregular groups, constant keys and filtered sums.

Executor observations, per-query timings and AB experiments

<!-- vera-evidence-q4-source-stack-full-results -->
Full SF1000 comparison for the first trained grouping package. GCC recorded the ten-query NDS-H training list twice and the 32-query NDS training list once.

<!-- vera-evidence-q4-stack-stages-results -->
Q4 and Q18 task CPU and stage timing.

<!-- vera-evidence-q4-source-clean-full-results -->
Full SF1000 comparison with restored PGO counters.

<!-- vera-evidence-q4-confirmation-20261123 -->
The grouping change in this PR added to the preceding four-change build reduced full NDS time by 1.01% (+1.45% and +0.57% in the paired blocks). Full NDS-H changed by −0.10% (+0.01% and −0.22%). Both used counter-restored PGO. A separate full-suite repeat of the combined package against the unmodified development branch measured +3.47% on NDS and +5.10% on NDS-H. These latter percentages include all changes in the combined package. Matched four-change comparison · Repeated development comparison.

Diff: 428 lines (+321 / -107) across 5 files Reviewer: thirtiseven Review duration: 3989m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 428 lines diff across 5 files
0.45
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Diff Size diff_size
0.363
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #142"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 45.1% (MEDIUM) · Higher = larger blast radius
45.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.8% · Safe to merge
17.8%