pub fn execute_recursive_cte<E, R>(
stmt: &RecursiveCteStatement,
execute_fn: E,
register_batches_fn: R,
) -> SqlResult<RecursiveCteResult>where
E: FnMut(&str) -> SqlResult<Vec<RecordBatch>>,
R: FnMut(&str, &[RecordBatch]) -> SqlResult<()>,Expand description
Execute a recursive CTE using a SqlEngine-like executor callback.
execute_fn is called with a SQL string and the name of the current
“working table” (a registered view containing the current accumulator rows).
It must return the resulting batches or an error.
register_batches_fn is called to register each iteration’s accumulator as
a temporary view under cte_name so the recursive branch can reference it.