fix: width_bucket returns null for num_buckets = i64::MAX #414
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.32) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 122 lines diff across 1 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.288
Real PR Conversation Timeline
1 comments
"Review active on #414"
general
weight: 0.35
andygrove
Fixes #404.
width_bucketcomputednum_buckets + 1before checking any bound onnum_buckets. Fornum_buckets = 9223372036854775807that overflows: a debug build panics withattempt to add with overflow, and a release build wraps toi64::MIN. Spark returns NULL for that value, becauseWidthBucket.isNullis true whennumBucket == Long.MaxValue.The kernel now returns null instead of computing the overflowing value, and the shared
bucket_from_f64helper has the same guard for the interval paths.Verification:
cargo test -p datafusion-spark --lib width_bucket: 22 passed; the new test fails onmainwithattempt to add with overflow.cargo test -p datafusion-spark-sqllogictest: 518 of 518 test runs passed, including the new case inmath/width_bucket.slt.cargo fmt --all -- --checkandcargo clippy -p datafusion-spark --all-targets -- -D warningsare clean.The text above was drafted with an AI assistant; I ran the tests myself.