← Back to Pull requests

[core][spark] Keep vector-store files of touched ranges in Data Evolution MERGE #11458

Open
unknown opened this pull request with 294 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 25, 2026 12:08 UTC
Author

Purpose

close #11456

A Data Evolution MERGE keeps only the files of touched row-id ranges. Vector-store files roll like blob files, so a range can hold several, but only blob files were mapped to their range. Vector files starting inside a touched range were dropped: updating another column failed the row-count check, and updating the vector column wrote NULL into the rest of the range.

MergeIntoPaimonDataEvolutionTable maps vector-store files and keeps the range start, since the vector column may be backfilled from a later row. DataEvolutionSplitRead drops vector-store files holding no read field when the group has a normal file.

For vector-store-only groups, incremental reads read by range when the files cover different rows; delta scans, and scans without deletion vectors, keep the group instead of failing to plan.

#11156 keeps this mapping blob-only, in DataEvolutionMergeMetadata.summarize and both inline fallbacks; whichever PR merges second adds vector-store files to all three.

Tests

  • RowTrackingTestBase, each with ON _ROW_ID and ON id, setting a normal or the vector column:

  • - "merge into keeps vector files that start inside a touched range": a 4000-row range whose vector file rolls at 1 kb, merged on row 1000; checks the other 3999 rows' vectors.
    - "merge into a range whose vector column is backfilled from a later row": the layout from the review.

  • VectorStoreTableTest:

  • - testReadWithoutAVectorColumnBackfilledFromALaterRow: reads id and id, embedding from splits planned for all columns, and _ROW_ID.
    - testReadOfARenamedVectorColumnNextToABackfilledOne: files are matched by field id.
    - testIncrementalRowIdReadOfVectorOnlyChanges, testIncrementalReadOfVectorOnlyChangesWithAPartialUnreadColumn: every row of the range is read, with and without a pushed-down row range.
    - testStreamingReadOfANormalColumnOverVectorOnlyChanges, with and without deletion vectors: the next plan reads four rows with NULL id, and rows 2 and 3 for embedding_v2.
    - testFileCreationTimeScanOfVectorOnlyChangesWithDeletionVectors: planning fails, as on master.
  • DataEvolutionFileStoreScanTest.testReadTypePruningKeepsVectorOnlyGroupWithoutReadField: delta scans, or any scan without deletion vectors, keep both vector files; with deletion vectors, other scans still throw.
  • Diff: 294 lines (+220 / -74) across 3 files Reviewer: LuciferYang Review duration: 5334m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 294 lines diff across 3 files
    0.40
    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.340
    Real PR Conversation Timeline
    1 comments
    "Review active on #11458"
    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.9% (MEDIUM) · Higher = larger blast radius
    39.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: 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: 21.3% · Safe to merge
    21.3%
    Repository