fn reset_plan_states(
plan: Arc<dyn ExecutionPlan>,
) -> Result<Arc<dyn ExecutionPlan>>Expand description
Some plans will change their internal states after execution, making them unable to be executed again.
This function uses ExecutionPlan::reset_state to reset any internal state within the plan.
An example is CrossJoinExec, which loads the left table into memory and stores it in the plan.
However, if the data of the left table is derived from the work table, it will become outdated
as the work table changes. When the next iteration executes this plan again, we must clear the left table.