mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 10:14:21 +01:00
clean up
This commit is contained in:
@@ -37,8 +37,8 @@ impl Display for Plan {
|
||||
order_by,
|
||||
} => {
|
||||
for (plan, operator) in left {
|
||||
writeln!(f, "{}", operator)?;
|
||||
plan.fmt(f)?;
|
||||
writeln!(f, "{}", operator)?;
|
||||
}
|
||||
right_most.fmt(f)?;
|
||||
if let Some(limit) = limit {
|
||||
@@ -283,7 +283,7 @@ impl ToSqlString for Plan {
|
||||
|
||||
let mut ret = Vec::new();
|
||||
for (plan, operator) in left {
|
||||
ret.push(format!("{} {}", operator, plan.to_sql_string(context)));
|
||||
ret.push(format!("{} {}", plan.to_sql_string(context), operator));
|
||||
}
|
||||
ret.push(right_most.to_sql_string(context));
|
||||
if let Some(order_by) = &order_by {
|
||||
|
||||
@@ -149,10 +149,10 @@ pub fn prepare_select_plan<'a>(
|
||||
)?;
|
||||
}
|
||||
|
||||
// Ensure all subplans have same number of result columns
|
||||
let first_num_result_columns = last.result_columns.len();
|
||||
// Ensure all subplans have the same number of result columns
|
||||
let right_most_num_result_columns = last.result_columns.len();
|
||||
for (plan, operator) in left.iter() {
|
||||
if plan.result_columns.len() != first_num_result_columns {
|
||||
if plan.result_columns.len() != right_most_num_result_columns {
|
||||
crate::bail_parse_error!("SELECTs to the left and right of {} do not have the same number of result columns", operator);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user