Skip to main content

Module recursive_cte

Module recursive_cte 

Source
Expand description

Recursive CTE execution plan for DataFusion.

Implements WITH RECURSIVE by iteratively executing the recursive part with an updated working table until a fixed point is reached (no new rows).

§Algorithm

  1. Execute the anchor (initial) query → working table
  2. Loop: a. Bind working table as a parameter under the CTE name b. Re-plan and execute the recursive query with updated params c. Deduplicate against previously seen rows (cycle detection) d. If no new rows, terminate e. Accumulate new rows and repeat
  3. Output all accumulated rows as a single-column list

Structs§

RecursiveCTEExec
Recursive CTE execution plan.