Skip to content

refactor(table): move pure-schema take and blob readers to lance-table-runtime - #11445

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/table-runtime-phase-1c
Nov 24, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/table-runtime-phase-1c

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Move schema-based point takes, row-ID and address resolution, and logical row offsets into lance-table-runtime.
  • Move lazy blob handles, descriptor resolution, and planned payload reads into the runtime. Preserve the public Dataset methods and lance::blob exports.
  • Delegate physical reads from TakeBuilder and keep SQL projection, scan streams, and blob writes in lance.

Verification

  • The runtime dependency trees with no default features and with all features contain zero DataFusion, sqlparser, and lance-index dependencies.
  • lance-table-runtime passed 240 unit tests and 23 doctests.
  • The lance take, blob, fragment, and row-offset filters passed 1,883 tests, with two existing ignored cases.
  • cargo check -p lance --tests --all-features, formatting, and workspace Clippy passed.
  • Rustdoc passed with -D warnings. Cargo emitted the existing optional-kernel build messages from lance-linalg.
  • The Python and JNI manifest checks passed and all three lockfiles are synchronized.
  • The module-size check passed with size advisories for two existing modules.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions github-actions Bot added A-python Python bindings A-java Java bindings + JNI A-deps Dependency updates labels Nov 24, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Gate recommendation: approve.

No blocking issues found. The extraction preserves take ordering, deletion handling, and blob storage bindings while keeping SQL evaluation in lance.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 24, 2026
@Xuanwo
Xuanwo merged commit 0cf6522 into main Nov 24, 2026
45 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/table-runtime-phase-1c branch November 24, 2026 16:11
Xuanwo added a commit that referenced this pull request Nov 24, 2026
…lance-table-runtime (#11455)

Part of the DataFusion-free core table crate refactor (Phase 2B,
following #11434, #11435, #11436, #11437, #11441, #11443, #11445, and
#11449).

## Problem

After Phase 2A moved the commit protocol, conflict resolution, and FRI
storage into `lance-table-runtime`, physical
fragment/blob/overlay/deletion writing and `InsertBuilder` still lived
in `lance` coupled to DataFusion streams and scalar index seed
selection, preventing standalone DataFusion-free table writes.

## Changes

- **`WriteSeedHook` & `SeedCollector` in `lance-table-runtime`**:
introduces the async `WriteSeedHook` seam over
`lance_table::format::index_seed::IndexSeedWriter` and moves
`SeedCollector` (observe/flush, global buffer locator generation,
V1/create/overwrite skip rules, feature-flag checks) into
`lance-table-runtime`. `lance` injects its scalar index registry /
ZoneMap implementation via `WriteSeedHook`.
- **Physical fragment, blob, deletion, updater, and overlay writers in
`lance-table-runtime`**: moves V1/V2 fragment writing,
`WriteParams`/`WriteMode`/`WriteProgress`/`ExternalBlobMode`,
`dictionary_budget`, target base-path resolution, data file parts,
deletion vector writing, `OverlayWriter`, fragment column/updater
writing, and DataFusion-free blob write/materialize/rewrite/clone logic
into `lance-table-runtime`, consuming
`lance_io::stream::RecordBatchStream` / `StreamingWriteSource`.
- **Pure-stream `InsertBuilder` in `lance-table-runtime`**: moves core
`InsertBuilder` into `lance-table-runtime` with optional
`WriteSeedHook`, `CommitIndexHook`, and commit lifecycle hook injection
while keeping `lance`'s public `InsertBuilder`, `Dataset::write`,
`WriteParams`, `OverlayWriter`, `FileFragment`, and `lance::blob` APIs
intact.
- **Standalone write/read tests**: adds
`rust/lance-table-runtime/tests/streaming_write.rs` covering end-to-end
create/append/overwrite, multi-fragment writes, blobs, deletions,
overlays, and stable row IDs without depending on `lance`, DataFusion,
`sqlparser`, or `lance-index`.
Xuanwo added a commit that referenced this pull request Dec 1, 2026
…rsection (#11301)

Fixes #11305.

Preserve literal field names in schema projection, both intersections,
and the shared `Projection::from_schema` entry point after #11445.
User-supplied string paths retain their existing parsing behavior.

Rust and Python `take` regressions cover single and multiple fragments
with repeated, out-of-order indices, checking values and types for `a`,
`` `a` ``, ``a`b``, and a real Int32 field named `` `_rowaddr` ``.

Validation on the rebased source:
- Core schema tests: 88 passed; DataFusion projection tests: 17 passed;
Rust `take` regressions: 2 passed.
- Rebuilt Python extension: 35 `take` tests passed.
- `cargo fmt --all -- --check`, `cargo clippy --all --tests --benches --
-D warnings`, `uv run make lint`, and pre-commit checks passed.

---------

Co-authored-by: Xuanwo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-deps Dependency updates A-java Java bindings + JNI A-python Python bindings K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants