--- source: prqlc/prqlc/tests/integration/queries.rs expression: "# clickhouse:skip (DB::Exception: Syntax error)\n# glaredb:skip (DataFusion does not support recursive CTEs https://github.com/apache/arrow-datafusion/issues/462)\nfrom [{n = 1}]\nselect n = n - 2\nloop (filter n < 4 | select n = n + 1)\nselect n = n * 2\nsort n\n" input_file: prqlc/prqlc/tests/integration/queries/loop_01.prql snapshot_kind: text --- frames: - - 1:177-193 - columns: - !Single name: - n target_id: 131 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 - - 1:200-212 - columns: - !Single name: - n target_id: 131 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 - - 1:215-231 - columns: - !Single name: - n target_id: 154 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 - - 1:194-232 - columns: - !Single name: - n target_id: 131 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 - - 1:233-249 - columns: - !Single name: - n target_id: 162 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 - - 1:250-256 - columns: - !Single name: - n target_id: 162 target_name: null inputs: - id: 127 name: _literal_127 table: - default_db - _literal_127 nodes: - id: 127 kind: Array span: 1:162-176 children: - 128 parent: 136 - id: 128 kind: Tuple span: 1:168-175 children: - 129 parent: 127 - id: 129 kind: Literal span: 1:173-174 alias: n parent: 128 - id: 131 kind: RqOperator span: 1:188-193 alias: n targets: - 133 - 134 parent: 135 - id: 133 kind: Ident span: 1:188-189 ident: !Ident - this - _literal_127 - n targets: - 127 - id: 134 kind: Literal span: 1:192-193 - id: 135 kind: Tuple span: 1:188-193 children: - 131 parent: 136 - id: 136 kind: 'TransformCall: Select' span: 1:177-193 children: - 127 - 135 parent: 160 - id: 145 kind: Ident ident: !Ident - _param - _tbl targets: - 142 parent: 153 - id: 149 kind: RqOperator span: 1:207-212 targets: - 151 - 152 parent: 153 - id: 151 kind: Ident span: 1:207-208 ident: !Ident - this - n targets: - 131 - id: 152 kind: Literal span: 1:211-212 - id: 153 kind: 'TransformCall: Filter' span: 1:200-212 children: - 145 - 149 parent: 159 - id: 154 kind: RqOperator span: 1:226-231 alias: n targets: - 156 - 157 parent: 158 - id: 156 kind: Ident span: 1:226-227 ident: !Ident - this - n targets: - 131 - id: 157 kind: Literal span: 1:230-231 - id: 158 kind: Tuple span: 1:226-231 children: - 154 parent: 159 - id: 159 kind: 'TransformCall: Select' span: 1:215-231 children: - 153 - 158 - id: 160 kind: 'TransformCall: Loop' span: 1:194-232 children: - 136 - 161 parent: 167 - id: 161 kind: Func span: 1:215-231 parent: 160 - id: 162 kind: RqOperator span: 1:244-249 alias: n targets: - 164 - 165 parent: 166 - id: 164 kind: Ident span: 1:244-245 ident: !Ident - this - n targets: - 131 - id: 165 kind: Literal span: 1:248-249 - id: 166 kind: Tuple span: 1:244-249 children: - 162 parent: 167 - id: 167 kind: 'TransformCall: Select' span: 1:233-249 children: - 160 - 166 parent: 170 - id: 168 kind: Ident span: 1:255-256 ident: !Ident - this - n targets: - 162 parent: 170 - id: 170 kind: 'TransformCall: Sort' span: 1:250-256 children: - 167 - 168 ast: name: Project stmts: - VarDef: kind: Main name: main value: Pipeline: exprs: - FuncCall: name: Ident: from span: 1:162-166 args: - Array: - Tuple: - Literal: Integer: 1 span: 1:173-174 alias: n span: 1:168-175 span: 1:167-176 span: 1:162-176 - FuncCall: name: Ident: select span: 1:177-183 args: - Binary: left: Ident: n span: 1:188-189 op: Sub right: Literal: Integer: 2 span: 1:192-193 span: 1:188-193 alias: n span: 1:177-193 - FuncCall: name: Ident: loop span: 1:194-198 args: - Pipeline: exprs: - FuncCall: name: Ident: filter span: 1:200-206 args: - Binary: left: Ident: n span: 1:207-208 op: Lt right: Literal: Integer: 4 span: 1:211-212 span: 1:207-212 span: 1:200-212 - FuncCall: name: Ident: select span: 1:215-221 args: - Binary: left: Ident: n span: 1:226-227 op: Add right: Literal: Integer: 1 span: 1:230-231 span: 1:226-231 alias: n span: 1:215-231 span: 1:200-231 span: 1:194-232 - FuncCall: name: Ident: select span: 1:233-239 args: - Binary: left: Ident: n span: 1:244-245 op: Mul right: Literal: Integer: 2 span: 1:248-249 span: 1:244-249 alias: n span: 1:233-249 - FuncCall: name: Ident: sort span: 1:250-254 args: - Ident: n span: 1:255-256 span: 1:250-256 span: 1:162-256 span: 1:0-256