-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
If we do this via raw calls, it would work something like this:
- Add accessors on the planner
.stateand.commandsthat return placeholderValueobjects representing the executor state and the commands used by a nested instance. - Add a function on the planner
.createSubplanner(or something). This function takes aFunctionCall, wraps it into aSubplanFunctionCalland puts it on the list of calls, then returns a new planner object initialised with the context of the parent. - When planning, if we encounter a
SubplanFunctionCall, recurse and plan that call before continuing. Use the same internal state for tracking slot liveness etc, as the same state array will be used throughout all the nested calls. - When looking at function arguments and return values, if we encounter a
StateValue, encode the special register ID for the state. If we encounter aCommandsValueand the current call is aSubplanFunctionCall, ABI-encode the the list of commands for that subplan and insert as a literal value into the state. - If we encounter a
CommandsValuein a call that's not aSubplanFunctionCall, throw an error. If we encounter aSubplanFunctionCallthat doesn't have aCommandsValue, throw an error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels