--- source: prqlc/prqlc/tests/integration/queries.rs expression: "# mssql:test\nfrom e=employees\nfilter first_name != \"Mitchell\"\nsort {first_name, last_name}\n\n# joining may use HashMerge, which can undo ORDER BY\njoin manager=employees side:left (e.reports_to == manager.employee_id)\n\nselect {e.first_name, e.last_name, manager.first_name}\n" input_file: prqlc/prqlc/tests/integration/queries/sort.prql snapshot_kind: text --- frames: - - 1:30-61 - columns: - !All input_id: 128 except: [] inputs: - id: 128 name: e table: - default_db - employees - - 1:62-90 - columns: - !All input_id: 128 except: [] inputs: - id: 128 name: e table: - default_db - employees - - 1:145-215 - columns: - !All input_id: 128 except: [] - !All input_id: 119 except: [] inputs: - id: 128 name: e table: - default_db - employees - id: 119 name: manager table: - default_db - employees - - 1:217-271 - columns: - !Single name: null target_id: 144 target_name: null - !Single name: - e - last_name target_id: 145 target_name: null - !Single name: - manager - first_name target_id: 146 target_name: null inputs: - id: 128 name: e table: - default_db - employees - id: 119 name: manager table: - default_db - employees nodes: - id: 119 kind: Ident span: 1:158-167 ident: !Ident - default_db - employees parent: 143 - id: 128 kind: Ident span: 1:13-29 ident: !Ident - default_db - employees parent: 134 - id: 130 kind: RqOperator span: 1:37-61 targets: - 132 - 133 parent: 134 - id: 132 kind: Ident span: 1:37-47 ident: !Ident - this - e - first_name targets: - 128 - id: 133 kind: Literal span: 1:51-61 - id: 134 kind: 'TransformCall: Filter' span: 1:30-61 children: - 128 - 130 parent: 138 - id: 135 kind: Ident span: 1:68-78 ident: !Ident - this - e - first_name targets: - 128 parent: 138 - id: 136 kind: Ident span: 1:80-89 ident: !Ident - this - e - last_name targets: - 128 parent: 138 - id: 138 kind: 'TransformCall: Sort' span: 1:62-90 children: - 134 - 135 - 136 parent: 143 - id: 139 kind: RqOperator span: 1:179-214 targets: - 141 - 142 parent: 143 - id: 141 kind: Ident span: 1:180-191 ident: !Ident - this - e - reports_to targets: - 128 - id: 142 kind: Ident span: 1:202-214 ident: !Ident - that - manager - employee_id targets: - 119 - id: 143 kind: 'TransformCall: Join' span: 1:145-215 children: - 138 - 119 - 139 parent: 148 - id: 144 kind: Ident span: 1:225-237 ident: !Ident - this - e - first_name targets: - 128 parent: 147 - id: 145 kind: Ident span: 1:239-250 ident: !Ident - this - e - last_name targets: - 128 parent: 147 - id: 146 kind: Ident span: 1:252-270 ident: !Ident - this - manager - first_name targets: - 119 parent: 147 - id: 147 kind: Tuple span: 1:224-271 children: - 144 - 145 - 146 parent: 148 - id: 148 kind: 'TransformCall: Select' span: 1:217-271 children: - 143 - 147 ast: name: Project stmts: - VarDef: kind: Main name: main value: Pipeline: exprs: - FuncCall: name: Ident: from span: 1:13-17 args: - Ident: employees span: 1:20-29 alias: e span: 1:13-29 - FuncCall: name: Ident: filter span: 1:30-36 args: - Binary: left: Ident: first_name span: 1:37-47 op: Ne right: Literal: String: Mitchell span: 1:51-61 span: 1:37-61 span: 1:30-61 - FuncCall: name: Ident: sort span: 1:62-66 args: - Tuple: - Ident: first_name span: 1:68-78 - Ident: last_name span: 1:80-89 span: 1:67-90 span: 1:62-90 - FuncCall: name: Ident: join span: 1:145-149 args: - Ident: employees span: 1:158-167 alias: manager - Binary: left: Indirection: base: Ident: e span: 1:179-180 field: !Name reports_to span: 1:180-191 op: Eq right: Indirection: base: Ident: manager span: 1:195-202 field: !Name employee_id span: 1:202-214 span: 1:179-214 named_args: side: Ident: left span: 1:173-177 span: 1:145-215 - FuncCall: name: Ident: select span: 1:217-223 args: - Tuple: - Indirection: base: Ident: e span: 1:225-226 field: !Name first_name span: 1:225-237 - Indirection: base: Ident: e span: 1:239-240 field: !Name last_name span: 1:239-250 - Indirection: base: Ident: manager span: 1:252-259 field: !Name first_name span: 1:252-270 span: 1:224-271 span: 1:217-271 span: 1:13-271 span: 1:0-271