Skip to content

feat(load): add bounded Arrow IPC ingestion path - #28145

Merged
XuPeng-SH merged 53 commits into
matrixorigin:mainfrom
iamlinjunhong:m-23684
Sep 9, 2026
Merged

XuPeng-SH merged 53 commits into
matrixorigin:mainfrom
iamlinjunhong:m-23684

Conversation

@iamlinjunhong

@iamlinjunhong iamlinjunhong commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Feature

Which issue(s) this PR fixes:

Closes #23684

What this PR does / why we need it:

Adds a bounded Apache Arrow IPC File/Stream ingestion path to LOAD DATA. The implementation is LOAD-only and preserves normal statement atomicity, schema validation, range identity checks, and cleanup/lease accounting.

Rollout and compatibility

  • Arrow admission is fail-closed by default: local File/Stream requires cn.frontend.arrow-load.enabled=true; S3/stage and distributed execution additionally require their explicit gates on every executing CN.
  • Remote Arrow pipeline payloads use MORPC v57; v56 and older peers reject the additive contract.
  • force-materialize=true is the immediate rollback/diagnostic path for borrowed backing.

Design and readiness

The versioned design records independent approval for the fail-closed implementation; production rollout approval remains pending and no Arrow surface is default-reachable without explicit per-CN opt-in. The readiness record also lists the still-required aggregate-admission, provider, mixed-version artifact, deployment, and owner evidence before broader rollout.

Validation

Focused configuration, planner, remote-protocol, external-reader/worker-gate, and real MySQL public-path gate tests pass locally using the repository CGo test wrapper. Required CI is running for the current head.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@matrix-meow matrix-meow added the size/XXL Denotes a PR that changes 2000+ lines label Sep 4, 2026

@LeftHandCold LeftHandCold left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep re-review of exact head 5e4522fb7d6b479a092ff26329d7ab6a5090f0e3 against base/merge-base 8934da65954f7bd099ea9445750bd17a438b3a1f: APPROVE for the documented fail-closed implementation.

The previously reported ordinary nullable-vector serialization blocker is resolved. The new value iterator inspects NULL bitmap positions without allocating an interface iterator or visiting every non-NULL descriptor. The physical-descriptor bound is retained; borrowed validity stays read-only, fixed-width vectors stay outside varlena normalization, and stale long NULL descriptors still normalize before serialization.

Independent measurements on isolated current base and head, identical benchmark source and freshly built/shared native artifacts; Linux amd64 / i9-10900K, Go 1.26.4, GOMAXPROCS=2, GOMEMLIMIT=3GiB, -p=1, normal mode, three 200ms samples, sequential base/head execution:

8192-row ordinary owned VARCHAR Base median ns/op Head median ns/op Allocations, both
15-byte, no NULL 6495 5962 20 B / 6
49-byte, no NULL 21919 19118 20 B / 6
15-byte, one NULL 6292 5984 40 B / 8
49-byte, one NULL 21997 19382 40 B / 8

This closes the prior order-of-magnitude serializer regression; these microbenchmarks are not an end-to-end SQL performance claim.

Validation: focused owned/stale-NULL, fixed-width nullable, borrowed canonical-area and stale-descriptor decode tests passed. An independent 12-scenario reviewer test also passed for 0/1/63/64/65/129 rows, ordinary versus stale long NULL descriptors, out-of-logical-range bitmap positions, round-trip values/nulls and source immutability. Tests and benchmarks all terminated successfully. Local initial cache-permission setup failures were corrected using temporary Go caches; they are not product failures.

Review/evidence scope: inventoried the complete 140-file change and read the review/thread history and current design/delivery/readiness records. Range-diff against previously reviewed f283ca1b proves 50 of its 51 patches equivalent; the remaining patch adapts IOVector.Release to the base's shared-decode resource snapshot. The only new commit is the bitmap/NULL optimization. I freshly reviewed that delta, the complete vector serialization path and affected consumers, relevant base append-metadata changes, and FileService cache-pin/shared-decode release interaction. The unchanged Arrow binding/conversion, provider conditional-read, lease/COW, worker/fanout and shutdown closures reuse the prior documented review evidence. This is not a claim that all 22k added lines were freshly reread.

Audit Result
Q1 ownership Cached-data reference, pin reservation callback and decoded-read lease retain separate release ownership; error cleanup clears owners. Marshal inspection does not materialize borrowed validity.
Q2 termination Latest iterator adds no blocking primitive; the inspected shared-decode interaction retains context/timer/close termination.
Q3 / performance Sparse-NULL owned serialization no longer performs the previous per-descriptor scan/allocation; normalization remains bounded by the marshal plan's lifetime.

Independently checked exact-head MatrixOne ALL CI, including successful race UT and actual TestArrowLoadMultiCN, TestArrowLoadRolloutRollbackDrain and public Arrow BVT results, plus green native and compose checks. LocalMinIO is explicitly skipped, not counted as provider evidence. git diff --check passed. The exact merge-tree with live main@af965c3e4d86ec218de05b585dbafbedb10aa1ae is conflict-free; that main still has cumulative MORPC v56 and Arrow uniquely adds v57.

No unresolved verified blocker found. The traceable implementation design decision remains accepted. All three Arrow gates remain off by default, with worker-local enforcement. Provider, aggregate admission, exact mixed-binary deployment and named production rollout approvals remain separate prerequisites before enabling the corresponding modes. No production service or cloud deployment was started locally, and no product source was modified.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Load arrow data

6 participants