diff --git a/core/translate.rs b/core/translate.rs index 09c96feb3..99a3c0a50 100644 --- a/core/translate.rs +++ b/core/translate.rs @@ -16,6 +16,7 @@ struct Select { src_tables: Vec, // Tables we use to get data from. This includes "from" and "joins" limit: Option, exist_aggregation: bool, + where_clause: Option, /// Ordered list of opened read table loops /// Used for generating a loop that looks like this: /// cursor 0 = open table 0 @@ -81,6 +82,7 @@ fn build_select(schema: &Schema, select: ast::Select) -> Result { src_tables: joins, limit: select.limit.clone(), exist_aggregation, + where_clause, loops: Vec::new(), }) } ast::OneSelect::Select { columns, from: None, + where_clause, .. } => { let column_info = analyze_columns(&columns, &Vec::new()); @@ -145,6 +149,7 @@ fn build_select(schema: &Schema, select: ast::Select) -> Result