nl2sql

ExecutorNode

Overview


Responsibilities


Position in Execution Graph

Upstream:

Downstream:

Trigger conditions:

flowchart LR
    Generator[GeneratorNode] --> Executor[ExecutorNode] --> EndNode[SubgraphEnd]

Inputs

From SubgraphExecutionState:

From NL2SQLContext:

Validation performed:


Outputs

Mutations to SubgraphExecutionState:

Side effects:


Internal Flow (Step-by-Step)

  1. Validate SQL and datasource ID.
  2. Check the adapter declares supports_sql; otherwise return INVALID_STATE.
  3. Build ExecutorRequest with trace/subgraph identifiers and schema version.
  4. Execute request and return ExecutorResponse.
  5. On exception, emit EXECUTOR_CRASH.

Contracts & Interfaces

Implements a LangGraph node callable:

def __call__(self, state: SubgraphExecutionState) -> Dict[str, Any]

Key contracts:


Determinism Guarantees


Error Handling

Emits PipelineError with:


Retry + Idempotency


Performance Characteristics


Observability


Configuration


Extension Points


Known Limitations