Skip to content

tp: keep what binding a pipeline plan finds beside the plan - #8382

Draft
LalitMaganti wants to merge 1 commit into
dev/lalitm/step-state-lifetimesfrom
dev/lalitm/pipe-bindings
Draft

LalitMaganti wants to merge 1 commit into
dev/lalitm/step-state-lifetimesfrom
dev/lalitm/pipe-bindings

Conversation

@LalitMaganti

Copy link
Copy Markdown
Member

Why

Binding a pipeline plan wrote what it found into the plan itself: a
scan's dataframe columns into its payload, and a dataframe argument's
column types over the types the plan was written with. After binding,
a plan was part what was written and part what was found, so anything
working on a bound plan had to know which. The passes in the PRs above
need the bound facts while they reorder and drop nodes, which is much
simpler when the two are kept apart.

Changes

  • Bindings holds what binding finds: by node, the dataframe columns
    and row count a scan reads; by column, its type.
  • BoundPlan keeps a LogicalPlan with its Bindings. DeserializePlan
    returns one, BindDataframeArgs fills it in, and Lower reads it.
    ResolveCompiledPlan binds a plan compiled in this process, which
    was never written.
  • The binding hooks are const: they record into Bindings and leave
    the plan as it was written. A scan's payload no longer holds its
    dataframe columns.

Testing

  • All trace processor unit tests and diff tests pass.
  • Every physical plan lowered while running the diff tests is
    byte-identical to before.

@LalitMaganti
LalitMaganti added this pull request to stack #8386 October 29, 2026 20:35
Binding a pipeline plan wrote what it found into the plan itself: a
scan's dataframe columns into its payload, and a dataframe argument's
column types over the types the plan was written with. After binding,
a plan was part what was written and part what was found, and anything
after binding had to know which.

Binding now records what it finds in Bindings, kept with the plan in a
BoundPlan, and leaves the plan as it was written. Lowering reads the
dataframes and types from there. Plans are unchanged.
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/pipe-bindings branch from ac87fd1 to 469d7a6 Compare October 29, 2026 20:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant