← Back to Pull requests

Make the Parquet decimal scale boundary test write two files deterministically [databricks] #17105

Closed
unknown closed this pull request without merging on Nov 24, 2026 01:50 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 19:09 UTC
Author

Fixes #17080.

Description

The Parquet decimal scale boundary test expects two nonempty files with the same schema. On Spark 3.3.0, repartition(2) seeds each input partition's round-robin start with its partition ID. For the small partition IDs in this fixture, the seeds pick the same starting bucket. When each nonempty input partition holds one row, all rows go to one output partition and the Parquet writer skips the empty one. Spark 3.3.1 changed the seeding to address this behavior. SPARK-40660

Use num_slices=2 to generate the same rows directly in two nonempty input partitions. This removes the shuffle and preserves the two-file assertion, CPU/GPU result comparison, and single coalesced GPU scan batch assertion. The change is limited to the integration test fixture.

Validation

  • On Spark 3.3.0 at local[8], Gera confirmed during review that the CPU write produced one file with the original fixture and two with the updated fixture. Review reproduction

  • In a separate local Spark 3.3.0 run, setting spark.default.parallelism=8 reproduced the failure at the two-file assertion in all four original integration cases. The Spark 3.3.0 build and all 78 targeted Parquet decimal integration cases passed with the fix, including all four affected cases. The explicit setting was used for local reproduction. For the reported CI failure, parallelism came from the executor cores.

  • Gera noted that the Spark 3.3.0 premerge runs at local[4,1], where the original fixture already writes two files. The higher-parallelism reproduction exercises the failure that premerge misses.
  • AI assistance was used for implementation and validation. The author reviewed and approved the complete changes before posting the PR.

    Checklists

    Documentation

  • Updated for new or modified user-facing features or behaviors

  • No user-facing change
  • Testing

  • Added or modified tests to cover new code paths

  • Covered by existing tests

  • Not required
  • Performance

  • Tests ran and results are added in the PR description

  • Issue filed with a link in the PR description

  • Not required
  • Diff: 281 lines (+210 / -71) across 3 files Reviewer: gerashegalov Review duration: 401m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 281 lines diff across 3 files
    0.40
    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.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17105"
    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: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    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: 15.7% · Safe to merge
    15.7%