pub fn plan(statement: &Statement) -> Result<Plan>Expand description
Build a logical execution plan from a parsed SQL statement.
The statement should ideally be optimized first (via
crate::optimizer::optimize) for the best plan quality, but this
is not required.
ยงErrors
Returns SqlglotError when the statement cannot be planned (e.g.,
DDL statements, unsupported constructs).