Skip to content

Add layout scan physical plan model - #9142

Open
joseph-isaacs wants to merge 2 commits into
developfrom
vortex-plan
Open

Add layout scan physical plan model#9142
joseph-isaacs wants to merge 2 commits into
developfrom
vortex-plan

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

see #9062

This PR add the first impl of plan nodes mirroring some layout readers.

Summary

  • add a standalone Plan / PlanRef model for layout scan planning
  • represent flat, chunked, dictionary, list, struct, expression, and row-index plans

@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 15.91%

❌ 1 regressed benchmark
✅ 1961 untouched benchmarks
⏩ 89 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation slice_primitive_tight_loop[10000] 423.5 µs 503.7 µs -15.91%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing vortex-plan (cdea383) with develop (1b34a5e)2

Open in CodSpeed

Footnotes

  1. 89 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on develop (ca7f626) during the generation of this report, so 1b34a5e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@joseph-isaacs
joseph-isaacs changed the base branch from develop to agent/shared-tree-display August 7, 2026 15:35
@joseph-isaacs
joseph-isaacs force-pushed the vortex-plan branch 2 times, most recently from 55e7a8c to c1b69a3 Compare August 7, 2026 16:42
Base automatically changed from agent/shared-tree-display to develop August 10, 2026 09:50
@joseph-isaacs
joseph-isaacs force-pushed the vortex-plan branch 5 times, most recently from 9914580 to 0f4ba4a Compare August 10, 2026 15:03
Comment thread vortex-layout/src/plan/plans/take.rs Outdated
Comment thread vortex-layout/src/plan/plans/eval.rs Outdated
Comment thread vortex-layout/src/plan/plans/pack.rs
Comment thread vortex-layout/src/plan/plans/pack.rs
Some(EmptyMetadata)
}

fn with_children(

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.

I assume you want to validated each child as well here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess

Comment thread vortex-layout/src/plan/children.rs Outdated
}

/// Returns a child collection with one slot replaced.
pub fn with_child(&self, index: usize, child: PlanRef) -> VortexResult<Self> {

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.

this is funky... you just keep stacking closures for any child which I think can fail very easily

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just very slow for no reason.

/// Creates a concatenation over `children`.
///
/// Every child must produce `dtype`, and the row domain is the sum of the child row counts.
pub fn try_new(dtype: DType, children: Vec<PlanRef>) -> VortexResult<Self> {

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.

You lose laziness here, not sure though how to think about try_new vs other constructors in this case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is a unchecked form_children here

) -> fmt::Result {
let children = plan.children();
for index in 0..children.len() {
let child = plan.child_required(index).map_err(|_| fmt::Error)?;

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.

This is unfortunate, we shouldn't swallow it but fmt error is very basic :/

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants