diff --git a/core/translate.rs b/core/translate.rs index 97486b7ab..0bc25a20a 100644 --- a/core/translate.rs +++ b/core/translate.rs @@ -17,15 +17,6 @@ struct Select { src_tables: Vec, // Tables we use to get data from. This includes "from" and "joins" limit: Option, exist_aggregation: bool, -} - -struct LoopInfo { - table: Table, - rewind_offset: usize, - open_cursor: usize, -} - -struct SelectContext { /// Ordered list of opened read table loops /// Used for generating a loop that looks like this: /// cursor 0 = open table 0 @@ -38,6 +29,12 @@ struct SelectContext { loops: Vec, } +struct LoopInfo { + table: Table, + rewind_offset: usize, + open_cursor: usize, +} + struct SrcTable { table: Table, join_info: Option, // FIXME: preferably this should be a reference with lifetime == Select ast expr @@ -135,6 +132,7 @@ fn build_select(schema: &Schema, select: ast::Select) -> Result { src_tables: Vec::new(), limit: select.limit.clone(), exist_aggregation, + loops: Vec::new(), }) } _ => todo!(), @@ -158,7 +157,7 @@ fn build_select(schema: &Schema, select: ast::Select) -> Result