fix: guard output sizes in expanding string kernels #7746
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 217 lines diff across 2 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.322
Real PR Conversation Timeline
1 comments
"Review active on #7746"
general
weight: 0.35
sunchao
Which issue does this PR close?
Part of #7500. Add output-size checks before allocation for
base64,randstr,lpad,rpad, read-side padding, and binary-to-string casts. Oversized output returns an error suggesting a smaller batch size instead of causing offset-overflow panics or excessive allocations.Rationale for this change
Expanding string kernels can produce batches beyond Arrow's offset limit. Unchecked output sizes can cause offset-overflow panics or excessive allocations instead of returning an error.
What changes are included in this PR?
base64,randstr,lpad,rpad, and read-side padding.randstroutput before initializing or advancing its RNG.spark.comet.batchSize.How are these changes tested?
randstrtests verify that rejected requests preserve the RNG sequence.