Skip to content

feat(scanner): plan _rowoffset and the DataFrame entry points - #8571

Draft
wjones127 wants to merge 1 commit into
will/logical-planner-7-ftsfrom
will/logical-planner-8-tail
Draft

feat(scanner): plan _rowoffset and the DataFrame entry points#8571
wjones127 wants to merge 1 commit into
will/logical-planner-7-ftsfrom
will/logical-planner-8-tail

Conversation

@wjones127

@wjones127 wjones127 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes the last gap between the logical path and Scanner: _rowoffset, plus the DataFrame surface the logical path makes possible.

A row's offset is its position in the dataset once deletions are accounted for, so computing one needs every earlier fragment's row count and deletion vector. AddRowOffsetExec::try_new is the only physical node constructor in the read path that does I/O, which is exactly the shape this design exists to remove: the load moves into stage 2, and a rule hands the result to the node.

With that, the new path plans every query shape the imperative one can, so every scanner test compares the two directly rather than one deferring to the other.

One behavioural note on the frame surface: a row's _created_at_version / _last_updated_at_version come from its position within its fragment, so only an ordered scan can produce them and the take above a search cannot. A frame with no projection of its own asks for every column the leaf advertises, so the take drops those two rather than asking the read for something it cannot return.

LanceContextExt / LanceDataFrameExt fall out of the rest of the work rather than being built for it. The scanner exposes one fixed query shape — filter, search, sort, limit, project, in that order. Making that shape planable required a scan leaf that is a real TableProvider, search nodes that are real logical nodes, and a lowering stage that reads only the plan; those three together also make the fixed shape unnecessary. A DataFrame can put a search anywhere and then join, aggregate, or window the result with anything DataFusion can express.

Also adds a planning benchmark, which measures the pipeline with no I/O left in it. It compares both read paths in one process, so Scanner gains a #[doc(hidden)] create_plan_logical for the bench to call — the last PR deletes it along with the path it was there to compare against.


Stack created with GitHub Stacks CLIGive Feedback 💬

@github-actions github-actions Bot added the enhancement New feature or request label Aug 17, 2026
@wjones127
wjones127 force-pushed the will/logical-planner-8-tail branch from 055765a to b54f475 Compare August 17, 2026 16:16
@wjones127
wjones127 force-pushed the will/logical-planner-8-tail branch 2 times, most recently from 496ca48 to 2a466ab Compare August 17, 2026 18:43
Completes the logical scan planner's coverage of `Scanner`: a `_rowoffset`
node with its row-offset map prefetched in stage 2, the `LanceContextExt` /
`LanceDataFrameExt` DataFrame surface, and a planning benchmark.

With this the new path can plan every query shape the imperative one can, so
the two are compared directly rather than one deferring to the other.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wjones127
wjones127 force-pushed the will/logical-planner-8-tail branch from 2a466ab to c3ba8bc Compare August 17, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant