← Back to Pull requests

perf(exec): Reuse probe vectors for inner join output on Vera #135

Closed
unknown closed this pull request without merging on Nov 23, 2026 09:46 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 07:11 UTC
Author

<!-- vera-contiguous-join-20261119 -->

Current PR head on Vera

Commit 313aac201 uses SVE to check every entry of an inner join's output row mapping. When the mapping is consecutive, the join returns the probe vector or a slice of it. A gap, a duplicate, a small batch or an ineligible encoding follows the existing projection path. The tests include a batch whose first and last row appear contiguous despite an interior duplicate and gap.

| Full SF1000 suite | Development baseline | Current PR head | Runtime reduction | Paired reductions |
|---|---:|---:|---:|---:|
| NDS | 121.948 s | 119.325 s | 2.15% | +2.43%, +1.88% |
| NDS-H | 62.983 s | 62.119 s | 1.37% | +2.36%, +0.39% |

A second full-suite comparison isolated the incremental change against the earlier head of this PR, 056393a0e. Positive percentages indicate shorter runtimes.

| Full SF1000 suite | Previous PR head | Current PR head | Runtime reduction | Paired reductions |
|---|---:|---:|---:|---:|
| NDS | 122.077 s | 119.650 s | 1.99% | +0.98%, +2.99% |
| NDS-H | 63.014 s | 62.461 s | 0.88% | −0.04%, +1.79% |

Each comparison used two order-reversed pairs per suite on Vera, 42 executors with eight slots each, and the same 103 NDS and 24 NDS-H query entries. All 1,016 timed executions across the two comparisons matched the reference outputs. The first NDS-H control run in the incremental comparison that exceeded the existing host-swap limit was excluded and rerun. The candidate used fresh HashProbe PGO from the original training queries. Four join tests passed on Vera with the measured native object, and the executable and read-only sections of a rebuild from the submitted source matched the timed library byte for byte.

Earlier PR head (056393a0e)

Change

Profiling the SF1000 NDS workload on NVIDIA Vera traced fixed-width row extraction in Q14 and Q23 to HashProbe::fillOutput. A matched INTEGER or BIGINT equality key in an inner join has the same value on both sides. Read that key from the probe vector using the existing output row mapping, avoiding a dependent access to each matching build row.

At initialization, identify eligible build-output columns when the ARM SVE row-extraction flag is enabled on Vera. For batches of at least 64 rows, gather flat probe keys with predicated SVE loads and stores. For other loaded encodings use the existing vector wrapping path. The existing build-side extraction handles ineligible columns, lazy inputs requiring a load and small batches.

Vera SF1000 results

The metric is the sum of the wall times of the 103 NDS or 24 NDS-H query entries. Positive reductions mean shorter runtimes. Both builds used the same Spark configuration, query order, placement and JVM with 42 executors of eight slots. The baseline was the target branch at 587bda4b5.

| Suite | Baseline median | Candidate median | Runtime reduction | Paired reductions |
|---|---:|---:|---:|---:|
| NDS | 122.398 s | 121.309 s | 0.89% | 1.34%, 0.44% |
| NDS-H | 62.668 s | 62.080 s | 0.94% | 1.22%, 0.66% |

The combined time of NDS Q14.1, Q14.2, Q23.1 and Q23.2 fell by 2.86% in the full runs. Workload instrumentation found eligible BIGINT outputs in NDS-H Q9 and Q21. Their combined time fell by 1.74%, with individual pairs ranging from 4.03% faster to 0.62% slower.

Each full-suite figure uses two runs per build with reversed pair order. The candidate regenerated the GCC profile for HashProbe.cpp on the original 10 NDS-H and 32 NDS training queries. The suite figures include the effects of both the implementation and its compiled layout. The INTEGER-only experiment and scalar comparison are in the profiling issue.

Validation

All 508 timed query executions matched their references. The benchmark cgroup recorded zero swap, and host swap I/O was at most 0.375 MiB per eligible run. Rebuilding the submitted source produced byte-identical native text and read-only data sections to the timed artifact.

The added HashJoinTest.projectedIntegerBuildKey cases passed on Vera. They check flat and dictionary probe vectors, nulls, duplicate matches, a non-vector-width batch size, mixed output columns, and BIGINT keys above the 32-bit range.

<!-- vera-same-jar-20261119 -->

Same-binary check on the profiled queries

A diagnostic package switches only the new join projection at executor startup. Each pair used the same JAR in both arms. All participating executors logged the requested setting and all queries matched their references. Each arm ran twice with reversed pair order.

| Profiled queries | Disabled median | Enabled median | Runtime reduction | Paired reductions |
|---|---:|---:|---:|---:|
| NDS Q14.1, Q14.2, Q23.1, Q23.2 | 27.119 s | 26.755 s | +1.34% | +0.60%, +2.07% |
| NDS-H Q9, Q18, Q21 | 24.025 s | 22.687 s | +5.57% | +4.45%, +6.66% |

<!-- vera-nov19-replication -->

Independent full-suite repeat at the submitted head

In a second campaign using the same target baseline and PR build, each build ran twice per suite in reversed order. The earlier campaign measured +2.15% on NDS and +1.37% on NDS-H.

| Suite | Development baseline | PR head | Runtime reduction |
|---|---:|---:|---:|
| NDS | 121.318 s | 119.368 s | +1.61% |
| NDS-H | 62.013 s | 62.017 s | −0.01% |

All 508 query executions for these two builds matched their references. The NDS improvement repeated. The NDS-H change was within run-to-run variation in this campaign.

Diff: 650 lines (+487 / -163) across 8 files Reviewer: thirtiseven Review duration: 5915m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
0.52
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.388
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #135"
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: 52% (MEDIUM) · Higher = larger blast radius
52%
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: 20.5% · Safe to merge
20.5%