Plan is a legacy design for planner v2 to be adapted with Interpreters. But in fact Interpreter is not a good abstraction.
In the ideal world, any statement can be optimized by optimizer and be expressed with a PhysicalPlan thus can be send to any node in the cluster to execute.
To make this work smoothly, we can migrate the Plans to RelOperator one by one, and introduce a universal Interpreter to execute the plans that can be expressed with a single SExpr(just like query execution in current implementation).
Background
Plan
is a legacy design for planner v2 to be adapted withInterpreter
s. But in factInterpreter
is not a good abstraction.In the ideal world, any statement can be optimized by optimizer and be expressed with a
PhysicalPlan
thus can be send to any node in the cluster to execute.To make this work smoothly, we can migrate the
Plan
s toRelOperator
one by one, and introduce a universalInterpreter
to execute the plans that can be expressed with a singleSExpr
(just like query execution in current implementation).Tracking