Reduce repeated Spark decimal SUM groups with NEON on Vera #141
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 365 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #141"
general
weight: 0.35
thirtiseven
Change
On NVIDIA Vera, sample adjacent group pointers in a dense flat Spark decimal SUM batch. When repeated groups are common, keep one accumulator in registers across a run and use NEON to reduce four valid values at a time. The bounds check leaves enough room for every intermediate sum. Nulls, wider values and carry boundaries use the existing scalar accumulator semantics. Other batches on Vera use a checked scalar addition.
Full SF1000 suite timings
The table gives mean summed query wall time over two runs per build in reversed order. Each executor used eight slots. All 42 executors used the same jemalloc settings. The development branch is
587bda4b559d. The preceding package includes other Velox and Gluten optimizations. The grouped SUM column adds only the new Spark SUM object to that package. The two rightmost columns isolate the SUM change.| Suite | Development | Preceding package | With grouped SUM | Reduction vs preceding | Pair 1 / pair 2 |
|---|---:|---:|---:|---:|---:|
| NDS | 123.217 s | 117.365 s | 117.492 s | -0.11% | +0.33% / -0.55% |
| NDS-H | 64.332 s | 62.682 s | 61.987 s | +1.11% | +2.54% / -0.38% |
NDS Q23.2 saved 0.181 s and 0.179 s in the two direct comparisons. Across all of NDS the paired changes differed in sign. The large first-pair NDS-H Q18 reduction coincided with earlier Spark stage overlap. The six compared builds returned the expected results for all 1,524 SQL executions. Complete timings, input shapes and selected query breakdown.
Validation and review status
The submitted header passed 18 Spark SUM tests on Vera plus a deterministic state check over 400,000 additions, covering sum, carry and null state. With the registered aggregate linked directly from this commit, the Q23-like repeated-group input took 2.699 ns/row versus 3.857 ns/row on the development parent. The median paired reduction was 30.16% across twelve pairs. The Q18-like random short-decimal input split evenly. Direct comparison of the submitted source and its parent.
The full-suite numbers above used the trained experimental header. The submitted version has a formatting cleanup and spells the equivalent high-word bound explicitly. The submitted header has its own training and development-only A/B scheduled. This draft keeps the operator and suite-level evidence visible while that standalone comparison runs.
Tracking issue #131.