← Back to Pull requests

Extract duplicated Scala string literals into constants and helpers #17099

Open
unknown opened this pull request with 252 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 23, 2026 09:07 UTC
Author

Fixes #17098.

Description

Consolidate duplicated Scala string literals across 48 files in sql-plugin-api, sql-plugin, udf-compiler (Scala 2.12 and 2.13), iceberg, and delta-lake into private final val constants and shared config documentation helpers (RapidsConfSqlEntries), while keeping all runtime error messages, config descriptions, and version mappings unchanged.

No behavioral or performance impact: final val string constants are compile-time constant expressions inlined by scalac, and extracted config documentation helpers run only once during RapidsConf initialization.

Validation:

  • Ran python3 build/check_shim_compatibility.py review --base-ref origin/main and advisory: core check PASS across all 35 profiles (0 new/existing findings); 4 joint-checked open peers reported NO_NEW_INTERACTION_FINDINGS.

  • Ran mvn -N -Dbuildver=352 -Dspark.rapids.source.basedir=$PWD antrun:run@scalastyle-all-modules: 2,135 files checked, 0 errors, 0 warnings.

  • Ran mvn package -DskipTests -Dmaven.test.skip=true -Dbuildver=352 -pl sql-plugin-api,sql-plugin,udf-compiler,iceberg/iceberg-1-6-x -am: BUILD SUCCESS.

  • Ran mvn package -DskipTests -Dmaven.test.skip=true -Dbuildver=353 -pl delta-lake/delta-33x -am: BUILD SUCCESS.

  • Ran mvn package -f scala2.13/pom.xml -Dbuildver=400 -DskipTests -Dmaven.test.skip=true -pl udf-compiler -am: BUILD SUCCESS.

  • Not run locally: Databricks shim/Delta profiles (350db143, 400db173, 410db183) and runtime unit/integration test suites, which will be covered by pre-merge CI.
  • AI assistance was used to prepare the patch and run validation.

    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: 252 lines (+189 / -63) across 3 files Reviewer: thirtiseven Review duration: 8393m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 252 lines diff across 3 files
    0.39
    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%
    46%
    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.331
    Real PR Conversation Timeline
    1 comments
    "Review active on #17099"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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% (MEDIUM) · Higher = larger blast radius
    39%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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.8% · Safe to merge
    20.8%