← Back to Pull requests

[core] Preserve append writer configuration per bucket across prepares #1188

Closed
unknown closed this pull request without merging on Oct 22, 2026 05:16 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 09:29 UTC
Author

Purpose

Keep one declared append write type throughout a TableWrite lifetime and preserve Java's Blob consumer lifecycle. Current Java callers configure their row type before writing; bucket writers capture that schema and consume rows positionally.

Changes

  • Configure with_write_type before the first effective write. Repeating the same ordered selection is a no-op; changing columns or order after writing is rejected, including after prepare or idle cleanup. Empty and ignored input does not lock the configuration.

  • Remove _row_write_columns, its Python stubs and Core resolver, along with historical schema lookup and per-bucket write-column caches. Native rows encode the selected columns and required routing/event fields in one batch.

  • Accept full-table Arrow input or the current selected layout with routing fields. Preserve selected column order and validate input before staging; omitted payloads, including live Blobs, remain untouched.

  • Capture Blob handlers per partition/bucket across consecutive active prepares. Retire idle unaware writers; fixed buckets require a strictly newer committed identifier from the same user. Filesystem lookup stops at expired snapshot gaps and propagates other errors before draining pending output.

  • Keep the ordinary Core prepare_commit() primitive unchanged. It conservatively retains fixed-bucket context without a checkpoint identifier; bindings forward their existing batch/stream identifiers through the internal bridge.

  • Release retired Blob callbacks promptly, preserve callbacks captured by active buckets, and expose real Python references to cycle collection. Preserve prepared files and consumer-visible Blob files on errors and close.

  • Keep URI reader factories configurable only before writing.

  • Merge current Rust main, including #1191. Preserve all search execution bridges alongside the writer identifier bridge and keep one internal module declaration.
  • Verification

  • 85 Core writer unit tests, including eight lifecycle regressions.

  • Five Blob consumer and cleanup unit tests, including the previously failing Windows case.

  • 40 append, filtering and precomputed-bucket integration tests, including fixed layout, selected transport, empty/ignored input and readback.

  • All 119 embedded Rust Python binding unit tests after merging current main, including callback retirement, GC and prepared-file preservation.

  • Rust 1.98 strict workspace Clippy with fulltext,vortex; formatting and diff checks.
  • No Native extension was rebuilt or installed into the Python test environments. Matching PyPaimon adapter, Pure Python lifecycle, regression tests and documentation changes are in apache/paimon#10724.

    Diff: 337 lines (+252 / -85) across 4 files Reviewer: JeonDaehong Review duration: 1186m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 337 lines diff across 4 files
    0.65
    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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #1188"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 65.4% (HIGH) · Higher = larger blast radius
    65.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: 25.8% · Safe to merge
    25.8%