[BugFix] Fix PPL replace being O(n²) in the field count (#5959) #5961
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 198 lines diff across 2 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.317
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5961"
general
weight: 0.35
Swiddis
Description
replacelooked up every column it leaves unchanged by name with a linear search, so on wide indices planning time grew with the square of the field count, no matter how many fields were replaced. It now builds a name-to-position map once and looks those columns up by position. The plan and query results are unchanged.Before / after:
source=wide_N | replace "s1" WITH "S1" IN status | head 10| Fields | Before | After |
|---:|---:|---:|
| 3,500 | 72 ms | 27 ms |
| 7,000 | 230 ms | 28 ms |
| 14,000 | 900 ms | 32 ms |
Related Issues
Resolves #5959
Check List
- [ ] New functionality has javadoc added.
- [ ] New functionality has a user manual doc added.
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.