← Back to Pull requests

Support Arrow row ID inputs for deletion #1210

Closed
unknown closed this pull request without merging on Oct 23, 2026 13:43 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 12:53 UTC
Author

Purpose

PyPaimon's distributed deletion already routes complete partition/bucket groups to the Core writer, but each worker still converts its Arrow row-ID column to Python objects before the binding accepts it. Accept those buffers through the existing deletion API.

Changes

  • Keep delete_by_row_id as the single batch/stream API; accept integer Arrow Array/ChunkedArray inputs alongside existing integer sequences.

  • Preserve sequence-only deletes when the optional PyArrow package is absent; keep dependency errors from broken installations visible.

  • Import and validate every chunk before mutation. Preserve slices, reject NULL IDs, unsupported types and UInt64 overflow, and release the GIL for conversion and execution.

  • Let Core consume an integer iterator, reusing existing captured-plan authorization, anchor routing, duplicate handling, complete bucket DV merging and conflict checks.

  • Cover captured snapshots, unselected anchor DVs, concurrent appends, stale index publication and invalid inputs that must not create physical index files. Update SDK signatures and examples.
  • Verification

  • Captured row-ID Core tests: 10 passed.

  • SDK Arrow input unit test: passed.

  • Current joint run: 1482 passed, 1 local-only deselection, exercising 1473 Native plans and 1217 Native reads. The excluded LeRobot spawn test requires an installed SDK in its ordinary child interpreter; the repository test remains unchanged in CI.

  • SDK/PyPaimon joint regression suite includes Arrow input, deletion, update, temporal, authorization, public execution boundaries and SDK update tests. SDK registered in a Cargo test executable; no extension installed or rebuilt in Python environments. Timezone and Native temporal subprocesses use the same executable with fresh interpreters.

  • New batch/stream sequence-delete regressions failed before the fix when PyArrow imports were blocked; they verify empty/list/tuple inputs, commits and persisted results.

  • Four actual Ray update/delete worker tests passed.

  • Rust 1.98.0 workspace/all-target Clippy with fulltext,vortex and -D warnings: passed.

  • Follow-up Rust 1.98.0 binding/all-target Clippy with -D warnings: passed.

  • cargo fmt --all -- --check, changed-file Python lint and git diff --check: passed.

  • Two independent review rounds rechecked the optional dependency fix, Arrow validation, captured plans, authorization and execution boundaries; no remaining actionable findings.
  • Companion PyPaimon PR: https://github.com/apache/paimon/pull/10779. It depends on this binding reaching main.

    Diff: 321 lines (+240 / -81) across 4 files Reviewer: JeonDaehong Review duration: 49m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 321 lines diff across 4 files
    0.42
    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.345
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1210"
    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: 41.9% (MEDIUM) · Higher = larger blast radius
    41.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: 16.6% · Safe to merge
    16.6%