← Back to Pull requests

test: cover signed zero and null handling in numeric guards #7807

Open
unknown opened this pull request with 164 lines diff across 2 files
View on GitHub
unknown unknown commented on Dec 01, 2026 00:44 UTC
Author

Which issue does this PR close?

Follow-up to #7730 for the numeric guard tests and the negative-zero logarithm input.

Rationale for this change

Both guards must turn -0.0 and +0.0 into NULL and preserve NaN. They differ for negative finite inputs. A negative divisor is valid, while a negative logarithm argument yields NULL. The existing logarithm fixtures exercise positive zero and negative numbers. Negative zero exercises the sign bit at the boundary.

What changes are included in this PR?

  • Add Rust tests for the floating-point guards and the decimal divisor guard.

  • Include CAST('-0.0' AS DOUBLE) in the Parquet inputs for ln, log10 and log2, so each function reads the signed zero from a column.
  • How are these changes tested?

    The Rust tests check array and scalar results for both float widths, including signed zeros, NaN, NULL and finite values on either side of zero. The decimal cases check that masking zero preserves the other values, precision and scale for Decimal128 and Decimal256. The SQL fixtures compare Comet with Spark, which returns NULL for each logarithm of negative zero. Hosted CI runs both suites.

    Diff: 164 lines (+123 / -41) across 2 files Reviewer: comphead Review duration: 2750m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.35) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 164 lines diff across 2 files
    0.35
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.305
    Real PR Conversation Timeline
    1 comments
    "Review active on #7807"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 35% (MEDIUM) · Higher = larger blast radius
    35%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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.0% · Safe to merge
    20.0%