← Back to Pull requests

fix: fix [[NULL]] array doesn't roundtrip in arrow-row bug #9275

Closed
unknown closed this pull request without merging on Feb 10, 2026 01:12 UTC
View on GitHub
unknown unknown commented on Jan 27, 2026 06:21 UTC
Author

Which issue does this PR close?

This PR fixes the root cause of issue #9227 where List<Null>, LargeList<Null>, and nested null lists fail to roundtrip through RowConverter.

Root Cause


The encoding of DataType::Null values produced 0 bytes, creating ambiguity when such values appeared as list elements. The decoder could not distinguish between:
  • A Null element in a list (encoded as 0 bytes)

  • The list's end-of-list marker EMPTY_SENTINEL (0x01)

  • For example, [[NULL]] would decode incorrectly to ListArray[ListArray[NullArray(0)]] instead of ListArray[ListArray[NullArray(1)]].

    Solution


    Add explicit encoding for DataType::Null values to eliminate the ambiguity at the source. Null values are now encoded as 2 bytes instead of 0:
    DataType::Null value: [0x02, 0x03] (NON_EMPTY_SENTINEL + NULL_VALUE_SENTINEL)
    List end marker: [0x01] (EMPTY_SENTINEL)

    Rationale for this change

    <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
    -->

    What changes are included in this PR?

    <!--
    There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
    -->

    Are these changes tested?

    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code

    If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
    -->

    Are there any user-facing changes?

    <!--
    If there are user-facing changes then we may require documentation to be updated before approving the PR.

    If there are any breaking changes to public APIs, please call them out.
    -->

    Diff: 248 lines (+186 / -62) across 3 files Reviewer: lichuang Review duration: 19850m
    All Vouch review confidence checks passed
    Residual risk 0.15 = 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 · 248 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.330
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #9275"
    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: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    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.4% · Safe to merge
    15.4%