← Back to Pull requests

fix: allow large JSON strings in the kernel default reader #7943

Closed
unknown closed this pull request without merging on Oct 29, 2026 22:54 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 21:01 UTC
Author

Which Delta project/connector is this regarding?

  • Spark

  • Standalone

  • Flink

  • Kernel

  • Other
  • Description

    When the default JSON handler runs with Jackson 2.15 or newer, a valid metadata action can fail with StreamConstraintsException if its decoded schemaString exceeds Jackson's default string limit. Jackson 2.13 does not impose that limit.

    Raise the default engine's Jackson dependencies from 2.13.5 to 2.15.4 and use the constraint APIs directly. Set the default reader's maximum string length to Integer.MAX_VALUE, preserving its other parser constraints and decimal handling. The constraint change is local to the reader's factory. Update the Kernel example's explicit Jackson dependency to match.

    How was this patch tested?

  • Added parameterized regression coverage for metadata with a schema string over 20 million characters, through both parseJson and readJsonFiles, plus malformed JSON cause preservation.

  • Compiled the updated handler with a Java 8 target against cached Jackson 2.15.1 and Kernel artifacts. Standalone checks of the actual handler passed for both parsing paths with strings over 20 million characters. Decimal precision, malformed JSON rejection, parser causes, and the default nesting-depth and number-length constraints were preserved.

  • git diff --check, handler ASCII and line-length checks, and example XML validation passed. The existing regression tests are unchanged.
  • The full DefaultJsonHandlerSuite could not start locally: SBT could not resolve its sbt-assembly build-plugin dependency because Maven repository DNS was unavailable. Exact Jackson 2.15.4 dependency resolution and the suite still need CI validation:

    build/sbt 'kernelDefaults / testOnly io.delta.kernel.defaults.engine.DefaultJsonHandlerSuite'
    

    Does this PR introduce _any_ user-facing changes?

    Yes. The default JSON handler can parse string values above Jackson's default limit. Accepting larger values can increase heap usage. The default engine's declared Jackson dependency moves from 2.13.5 to 2.15.4; the implementation now requires Jackson 2.15 or newer.

    Diff: 267 lines (+200 / -67) across 3 files Reviewer: huan233usc Review duration: 8753m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 267 lines diff across 3 files
    0.39
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7943"
    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.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    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.6% · Safe to merge
    15.6%
    Repository