Skip to content

Ji/ngates/exeution 3#6824

Draft
joseph-isaacs wants to merge 5 commits intodevelopfrom
ji/ngates/exeution-3
Draft

Ji/ngates/exeution 3#6824
joseph-isaacs wants to merge 5 commits intodevelopfrom
ji/ngates/exeution-3

Conversation

@joseph-isaacs
Copy link
Contributor

Summary

Closes: #000

Testing

gatesn and others added 5 commits March 6, 2026 14:13
Adds a method to replace a single child of an array by index,
building on the existing with_children infrastructure. This is
needed by the upcoming iterative execution scheduler which replaces
children one at a time as they are executed.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the ExecutionStep enum (ExecuteChild, ColumnarizeChild, Done)
that encodings will return from VTable::execute instead of ArrayRef.
This is infrastructure for the upcoming iterative execution scheduler.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…duler

Changes the VTable::execute signature to return ExecutionStep instead of
ArrayRef, and replaces the Executable for Columnar implementation with an
iterative work-stack scheduler.

The ExecutionStep enum has three variants:
- ExecuteChild(i): ask the scheduler to execute child i to columnar
- ColumnarizeChild(i): same but skip cross-step optimization
- Done(result): execution complete

The new scheduler in Executable for Columnar uses an explicit stack
instead of recursion, and runs reduce/reduce_parent rules between
steps via the existing optimizer infrastructure.

All encoding implementations are mechanically wrapped in
ExecutionStep::Done(...) to preserve existing behavior. Individual
encodings will be migrated to use ExecuteChild/ColumnarizeChild in
follow-up PRs.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the iterative execution scheduler into a general-purpose
`execute_until<M: Matcher>` method on `dyn Array`. The scheduler
terminates when the root array matches `M`, while each child
can specify its own termination condition via a `DonePredicate`
carried in `ExecutionStep::ExecuteChild`.

`ExecutionStep` now provides constructor methods:
- `execute_child::<M>(idx)` — request child execution until M matches
- `done(result)` — signal completion

Both `Executable for Columnar` and `Executable for Canonical` are
simplified to thin wrappers over `execute_until` with `AnyColumnar`
and `AnyCanonical` matchers respectively.

Signed-off-by: Nick Gates <nick@vortex.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joseph-isaacs joseph-isaacs force-pushed the ji/ngates/exeution-3 branch from e3eb3c6 to 0bcdf7d Compare March 6, 2026 16:44
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.

2 participants