diff --git a/prqlc/bindings/prqlc-python/src/lib.rs b/prqlc/bindings/prqlc-python/src/lib.rs index 34f122a57e9b..7b83e4bb2215 100644 --- a/prqlc/bindings/prqlc-python/src/lib.rs +++ b/prqlc/bindings/prqlc-python/src/lib.rs @@ -232,7 +232,7 @@ mod test { fn debug_prql_lineage() { assert_snapshot!( debug::prql_lineage(r#"from a | select { beta, gamma }"#).unwrap(), - @r#"{"frames":[["1:9-31",{"columns":[{"Single":{"name":["a","beta"],"target_id":119,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":120,"target_name":null}}],"inputs":[{"id":117,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":117,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":122},{"id":119,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[117],"parent":121},{"id":120,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[117],"parent":121},{"id":121,"kind":"Tuple","span":"1:16-31","children":[119,120],"parent":122},{"id":122,"kind":"TransformCall: Select","span":"1:9-31","children":[117,121]}],"ast":{"name":"Project","stmts":[{"VarDef":{"kind":"Main","name":"main","value":{"Pipeline":{"exprs":[{"FuncCall":{"name":{"Ident":["from"],"span":"1:0-4"},"args":[{"Ident":["a"],"span":"1:5-6"}]},"span":"1:0-6"},{"FuncCall":{"name":{"Ident":["select"],"span":"1:9-15"},"args":[{"Tuple":[{"Ident":["beta"],"span":"1:18-22"},{"Ident":["gamma"],"span":"1:24-29"}],"span":"1:16-31"}]},"span":"1:9-31"}]},"span":"1:0-31"}},"span":"1:0-31"}]}}"# + @r#"{"frames":[["1:9-31",{"columns":[{"Single":{"name":["a","beta"],"target_id":120,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":121,"target_name":null}}],"inputs":[{"id":118,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":118,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":123},{"id":120,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[118],"parent":122},{"id":121,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[118],"parent":122},{"id":122,"kind":"Tuple","span":"1:16-31","children":[120,121],"parent":123},{"id":123,"kind":"TransformCall: Select","span":"1:9-31","children":[118,122]}],"ast":{"name":"Project","stmts":[{"VarDef":{"kind":"Main","name":"main","value":{"Pipeline":{"exprs":[{"FuncCall":{"name":{"Ident":["from"],"span":"1:0-4"},"args":[{"Ident":["a"],"span":"1:5-6"}]},"span":"1:0-6"},{"FuncCall":{"name":{"Ident":["select"],"span":"1:9-15"},"args":[{"Tuple":[{"Ident":["beta"],"span":"1:18-22"},{"Ident":["gamma"],"span":"1:24-29"}],"span":"1:16-31"}]},"span":"1:9-31"}]},"span":"1:0-31"}},"span":"1:0-31"}]}}"# ); } @@ -240,7 +240,7 @@ mod test { fn debug_pl_to_lineage() { assert_snapshot!( prql_to_pl(r#"from a | select { beta, gamma }"#).and_then(|x| debug::pl_to_lineage(&x)).unwrap(), - @r#"{"frames":[["1:9-31",{"columns":[{"Single":{"name":["a","beta"],"target_id":119,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":120,"target_name":null}}],"inputs":[{"id":117,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":117,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":122},{"id":119,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[117],"parent":121},{"id":120,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[117],"parent":121},{"id":121,"kind":"Tuple","span":"1:16-31","children":[119,120],"parent":122},{"id":122,"kind":"TransformCall: Select","span":"1:9-31","children":[117,121]}],"ast":{"name":"Project","stmts":[{"VarDef":{"kind":"Main","name":"main","value":{"Pipeline":{"exprs":[{"FuncCall":{"name":{"Ident":["from"],"span":"1:0-4"},"args":[{"Ident":["a"],"span":"1:5-6"}]},"span":"1:0-6"},{"FuncCall":{"name":{"Ident":["select"],"span":"1:9-15"},"args":[{"Tuple":[{"Ident":["beta"],"span":"1:18-22"},{"Ident":["gamma"],"span":"1:24-29"}],"span":"1:16-31"}]},"span":"1:9-31"}]},"span":"1:0-31"}},"span":"1:0-31"}]}}"# + @r#"{"frames":[["1:9-31",{"columns":[{"Single":{"name":["a","beta"],"target_id":120,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":121,"target_name":null}}],"inputs":[{"id":118,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":118,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":123},{"id":120,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[118],"parent":122},{"id":121,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[118],"parent":122},{"id":122,"kind":"Tuple","span":"1:16-31","children":[120,121],"parent":123},{"id":123,"kind":"TransformCall: Select","span":"1:9-31","children":[118,122]}],"ast":{"name":"Project","stmts":[{"VarDef":{"kind":"Main","name":"main","value":{"Pipeline":{"exprs":[{"FuncCall":{"name":{"Ident":["from"],"span":"1:0-4"},"args":[{"Ident":["a"],"span":"1:5-6"}]},"span":"1:0-6"},{"FuncCall":{"name":{"Ident":["select"],"span":"1:9-15"},"args":[{"Tuple":[{"Ident":["beta"],"span":"1:18-22"},{"Ident":["gamma"],"span":"1:24-29"}],"span":"1:16-31"}]},"span":"1:9-31"}]},"span":"1:0-31"}},"span":"1:0-31"}]}}"# ); } } diff --git a/prqlc/prqlc/src/cli/test.rs b/prqlc/prqlc/src/cli/test.rs index 48a4a0823e4e..8d0b3f381a10 100644 --- a/prqlc/prqlc/src/cli/test.rs +++ b/prqlc/prqlc/src/cli/test.rs @@ -434,29 +434,29 @@ fn debug() { name: - tracks - artist - target_id: 119 + target_id: 120 target_name: null - !Single name: - tracks - album - target_id: 120 + target_id: 121 target_name: null inputs: - - id: 117 + - id: 118 name: tracks table: - default_db - tracks nodes: - - id: 117 + - id: 118 kind: Ident span: 1:0-11 ident: !Ident - default_db - tracks - parent: 122 - - id: 119 + parent: 123 + - id: 120 kind: Ident span: 1:22-28 ident: !Ident @@ -464,9 +464,9 @@ fn debug() { - tracks - artist targets: - - 117 - parent: 121 - - id: 120 + - 118 + parent: 122 + - id: 121 kind: Ident span: 1:30-35 ident: !Ident @@ -474,21 +474,21 @@ fn debug() { - tracks - album targets: - - 117 - parent: 121 - - id: 121 + - 118 + parent: 122 + - id: 122 kind: Tuple span: 1:21-36 children: - - 119 - 120 - parent: 122 - - id: 122 + - 121 + parent: 123 + - id: 123 kind: 'TransformCall: Select' span: 1:14-36 children: - - 117 - - 121 + - 118 + - 122 ast: name: Project stmts: diff --git a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__append_union_different_tables.snap b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__append_union_different_tables.snap index 38c6c43d7ba4..4a4a7c96be2b 100644 --- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__append_union_different_tables.snap +++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__append_union_different_tables.snap @@ -7,21 +7,21 @@ columns: name: - employees - name - target_id: 133 + target_id: 134 target_name: ~ - Single: name: - employees - salary - target_id: 134 + target_id: 135 target_name: ~ inputs: - - id: 131 + - id: 132 name: employees table: - default_db - employees - - id: 120 + - id: 121 name: managers table: - default_db diff --git a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap index 3593e06b8fa2..d12c3c8104d0 100644 --- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap +++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap @@ -4,18 +4,18 @@ expression: "resolve_lineage(r#\"\n from table_1\n join cu --- columns: - All: - input_id: 118 + input_id: 119 except: [] - All: - input_id: 115 + input_id: 116 except: [] inputs: - - id: 118 + - id: 119 name: table_1 table: - default_db - table_1 - - id: 115 + - id: 116 name: customers table: - default_db diff --git a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap index 3cb5d91f2de0..804e9f996604 100644 --- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap +++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap @@ -7,26 +7,26 @@ columns: name: - e - emp_no - target_id: 128 + target_id: 129 target_name: ~ - Single: name: - e - gender - target_id: 129 + target_id: 130 target_name: ~ - Single: name: - emp_salary - target_id: 147 + target_id: 148 target_name: ~ inputs: - - id: 121 + - id: 122 name: e table: - default_db - employees - - id: 118 + - id: 119 name: salaries table: - default_db diff --git a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names.snap b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names.snap index 12aa87959151..e1d5c30ad09f 100644 --- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names.snap +++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names.snap @@ -7,26 +7,26 @@ columns: name: - orders - customer_no - target_id: 122 + target_id: 123 target_name: ~ - Single: name: - orders - gross - target_id: 123 + target_id: 124 target_name: ~ - Single: name: - orders - tax - target_id: 124 + target_id: 125 target_name: ~ - Single: name: ~ - target_id: 125 + target_id: 126 target_name: ~ inputs: - - id: 120 + - id: 121 name: orders table: - default_db diff --git a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__transforms__tests__aggregate_positional_arg-2.snap b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__transforms__tests__aggregate_positional_arg-2.snap index a59851dd1736..b69b52fe7aed 100644 --- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__transforms__tests__aggregate_positional_arg-2.snap +++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__transforms__tests__aggregate_positional_arg-2.snap @@ -21,10 +21,10 @@ TransformCall: lineage: columns: - All: - input_id: 117 + input_id: 118 except: [] inputs: - - id: 117 + - id: 118 name: c_invoice table: - default_db @@ -94,14 +94,14 @@ lineage: name: - c_invoice - issued_at - target_id: 119 + target_id: 120 target_name: ~ - Single: name: ~ - target_id: 135 + target_id: 136 target_name: ~ inputs: - - id: 117 + - id: 118 name: c_invoice table: - default_db diff --git a/prqlc/prqlc/src/semantic/std.prql b/prqlc/prqlc/src/semantic/std.prql index 82690e5e0066..7facc92d5760 100644 --- a/prqlc/prqlc/src/semantic/std.prql +++ b/prqlc/prqlc/src/semantic/std.prql @@ -224,7 +224,10 @@ module text { } ## Date functions + module date { + # Returns the current date and time as a timestamp. + let now = -> internal std.date.now let to_text = format column -> internal std.date.to_text let diff = `noresolve.unit` start end -> internal std.date.diff } diff --git a/prqlc/prqlc/src/sql/std.sql.prql b/prqlc/prqlc/src/sql/std.sql.prql index a361311396b2..0ff6ab75ad10 100644 --- a/prqlc/prqlc/src/sql/std.sql.prql +++ b/prqlc/prqlc/src/sql/std.sql.prql @@ -130,6 +130,9 @@ module date { # Snowflake: https://docs.snowflake.com/en/sql-reference/functions/datediff # Redshift: https://docs.aws.amazon.com/redshift/latest/dg/r_DATEDIFF_function.html let diff = unit start end -> s"DATEDIFF({unit:0}, {start:0}, {end:0})" + + # CURRENT_TIMESTAMP is ANSI SQL standard; dialects may override. + let now = -> s"CURRENT_TIMESTAMP" } # Source-reading functions, primarily for DuckDB @@ -215,6 +218,8 @@ module bigquery { let to_text = format column -> s"FORMAT_TIMESTAMP({format:0}, CAST({column:0} AS TIMESTAMP))" # https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_diff let diff = unit start end -> s"DATE_DIFF({end:0}, {start:0}, {unit:0})" + # BigQuery requires parentheses for CURRENT_TIMESTAMP + let now = -> s"CURRENT_TIMESTAMP()" } let regex_search = text pattern -> s"REGEXP_CONTAINS({text:0}, {pattern:0})" @@ -234,6 +239,8 @@ module clickhouse { let to_text = format column -> s"formatDateTimeInJodaSyntax({column:0}, {format:0})" # https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions#dateDiff let diff = unit start end -> s"dateDiff('{unit:0}', {start:0}, {end:0})" + # Clickhouse uses now() for current timestamp + let now = -> s"now()" } let regex_search = text pattern -> s"match({text:0}, {pattern:0})" @@ -314,6 +321,8 @@ module mysql { let to_text = format column -> s"DATE_FORMAT({column:0}, {format:0})" # https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_timestampdiff let diff = unit start end -> s"TIMESTAMPDIFF({unit:0}, {start:0}, {end:0})" + # MySQL uses NOW() function + let now = -> s"NOW()" } # 'c' for case-sensitive diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__aggregation.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__aggregation.snap index e6457e5b71a6..d89effb1f540 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__aggregation.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__aggregation.snap @@ -7,10 +7,10 @@ frames: - - 1:101-123 - columns: - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -18,15 +18,15 @@ frames: - - 1:124-154 - columns: - !All - input_id: 123 + input_id: 124 except: [] - !Single name: - empty_name - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -35,42 +35,42 @@ frames: - columns: - !Single name: null - target_id: 136 + target_id: 137 target_name: null - !Single name: null - target_id: 139 + target_id: 140 target_name: null - !Single name: null - target_id: 142 + target_id: 143 target_name: null - !Single name: null - target_id: 145 + target_id: 146 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:89-100 ident: !Ident - default_db - tracks - parent: 129 -- id: 125 + parent: 130 +- id: 126 kind: RqOperator span: 1:108-123 targets: - - 127 - 128 - parent: 129 -- id: 127 + - 129 + parent: 130 +- id: 128 kind: Ident span: 1:108-116 ident: !Ident @@ -78,26 +78,26 @@ nodes: - tracks - genre_id targets: - - 123 -- id: 128 + - 124 +- id: 129 kind: Literal span: 1:120-123 -- id: 129 +- id: 130 kind: 'TransformCall: Filter' span: 1:101-123 children: - - 123 - - 125 - parent: 135 -- id: 130 + - 124 + - 126 + parent: 136 +- id: 131 kind: RqOperator span: 1:144-154 alias: empty_name targets: - - 132 - 133 - parent: 134 -- id: 132 + - 134 + parent: 135 +- id: 133 kind: Ident span: 1:144-148 ident: !Ident @@ -105,30 +105,30 @@ nodes: - tracks - name targets: - - 123 -- id: 133 + - 124 +- id: 134 kind: Literal span: 1:152-154 -- id: 134 +- id: 135 kind: Tuple span: 1:144-154 children: - - 130 - parent: 135 -- id: 135 + - 131 + parent: 136 +- id: 136 kind: 'TransformCall: Derive' span: 1:124-154 children: - - 129 - - 134 - parent: 149 -- id: 136 + - 130 + - 135 + parent: 150 +- id: 137 kind: RqOperator span: 1:166-178 targets: - - 138 - parent: 148 -- id: 138 + - 139 + parent: 149 +- id: 139 kind: Ident span: 1:170-178 ident: !Ident @@ -136,14 +136,14 @@ nodes: - tracks - track_id targets: - - 123 -- id: 139 + - 124 +- id: 140 kind: RqOperator span: 1:180-197 targets: - - 141 - parent: 148 -- id: 141 + - 142 + parent: 149 +- id: 142 kind: Ident span: 1:193-197 ident: !Ident @@ -151,50 +151,50 @@ nodes: - tracks - name targets: - - 123 -- id: 142 + - 124 +- id: 143 kind: RqOperator span: 1:199-213 targets: - - 144 - parent: 148 -- id: 144 + - 145 + parent: 149 +- id: 145 kind: Ident span: 1:203-213 ident: !Ident - this - empty_name targets: - - 130 -- id: 145 + - 131 +- id: 146 kind: RqOperator span: 1:215-229 targets: - - 147 - parent: 148 -- id: 147 + - 148 + parent: 149 +- id: 148 kind: Ident span: 1:219-229 ident: !Ident - this - empty_name targets: - - 130 -- id: 148 + - 131 +- id: 149 kind: Tuple span: 1:165-230 children: - - 136 - - 139 - - 142 - - 145 - parent: 149 -- id: 149 + - 137 + - 140 + - 143 + - 146 + parent: 150 +- id: 150 kind: 'TransformCall: Aggregate' span: 1:155-230 children: - - 135 - - 148 + - 136 + - 149 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select.snap index dde49ec7ff5e..dcdeb7ead05a 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select.snap @@ -10,22 +10,22 @@ frames: name: - invoices - customer_id - target_id: 147 + target_id: 148 target_name: null - !Single name: - invoices - invoice_id - target_id: 148 + target_id: 149 target_name: null - !Single name: - invoices - billing_country - target_id: 149 + target_id: 150 target_name: null inputs: - - id: 145 + - id: 146 name: invoices table: - default_db @@ -36,22 +36,22 @@ frames: name: - invoices - customer_id - target_id: 147 + target_id: 148 target_name: null - !Single name: - invoices - invoice_id - target_id: 148 + target_id: 149 target_name: null - !Single name: - invoices - billing_country - target_id: 149 + target_id: 150 target_name: null inputs: - - id: 145 + - id: 146 name: invoices table: - default_db @@ -62,22 +62,22 @@ frames: name: - invoices - customer_id - target_id: 128 + target_id: 129 target_name: null - !Single name: - invoices - invoice_id - target_id: 129 + target_id: 130 target_name: null - !Single name: - invoices - billing_country - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 + - id: 127 name: invoices table: - default_db @@ -88,22 +88,22 @@ frames: name: - invoices - customer_id - target_id: 128 + target_id: 129 target_name: null - !Single name: - invoices - invoice_id - target_id: 129 + target_id: 130 target_name: null - !Single name: - invoices - billing_country - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 + - id: 127 name: invoices table: - default_db @@ -114,27 +114,27 @@ frames: name: - invoices - customer_id - target_id: 147 + target_id: 148 target_name: null - !Single name: - invoices - invoice_id - target_id: 148 + target_id: 149 target_name: null - !Single name: - invoices - billing_country - target_id: 149 + target_id: 150 target_name: null inputs: - - id: 145 + - id: 146 name: invoices table: - default_db - invoices - - id: 126 + - id: 127 name: invoices table: - default_db @@ -145,34 +145,34 @@ frames: name: - invoices - billing_country - target_id: 157 + target_id: 158 target_name: null - !Single name: - invoices - invoice_id - target_id: 158 + target_id: 159 target_name: null inputs: - - id: 145 + - id: 146 name: invoices table: - default_db - invoices - - id: 126 + - id: 127 name: invoices table: - default_db - invoices nodes: -- id: 126 +- id: 127 kind: Ident span: 1:89-102 ident: !Ident - default_db - invoices - parent: 132 -- id: 128 + parent: 133 +- id: 129 kind: Ident span: 1:114-125 ident: !Ident @@ -180,9 +180,9 @@ nodes: - invoices - customer_id targets: - - 126 - parent: 131 -- id: 129 + - 127 + parent: 132 +- id: 130 kind: Ident span: 1:127-137 ident: !Ident @@ -190,9 +190,9 @@ nodes: - invoices - invoice_id targets: - - 126 - parent: 131 -- id: 130 + - 127 + parent: 132 +- id: 131 kind: Ident span: 1:139-154 ident: !Ident @@ -200,49 +200,49 @@ nodes: - invoices - billing_country targets: - - 126 - parent: 131 -- id: 131 + - 127 + parent: 132 +- id: 132 kind: Tuple span: 1:112-156 children: - - 128 - 129 - 130 - parent: 132 -- id: 132 + - 131 + parent: 133 +- id: 133 kind: 'TransformCall: Select' span: 1:105-156 children: - - 126 - - 131 - parent: 136 -- id: 133 + - 127 + - 132 + parent: 137 +- id: 134 kind: Literal span: 1:164-166 alias: start - parent: 136 -- id: 134 + parent: 137 +- id: 135 kind: Literal span: 1:168-170 alias: end - parent: 136 -- id: 136 + parent: 137 +- id: 137 kind: 'TransformCall: Take' span: 1:159-170 children: - - 132 - 133 - 134 - parent: 156 -- id: 145 + - 135 + parent: 157 +- id: 146 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 151 -- id: 147 + parent: 152 +- id: 148 kind: Ident span: 1:23-34 ident: !Ident @@ -250,9 +250,9 @@ nodes: - invoices - customer_id targets: - - 145 - parent: 150 -- id: 148 + - 146 + parent: 151 +- id: 149 kind: Ident span: 1:36-46 ident: !Ident @@ -260,9 +260,9 @@ nodes: - invoices - invoice_id targets: - - 145 - parent: 150 -- id: 149 + - 146 + parent: 151 +- id: 150 kind: Ident span: 1:48-63 ident: !Ident @@ -270,49 +270,49 @@ nodes: - invoices - billing_country targets: - - 145 - parent: 150 -- id: 150 + - 146 + parent: 151 +- id: 151 kind: Tuple span: 1:21-65 children: - - 147 - 148 - 149 - parent: 151 -- id: 151 + - 150 + parent: 152 +- id: 152 kind: 'TransformCall: Select' span: 1:14-65 children: - - 145 - - 150 - parent: 155 -- id: 152 + - 146 + - 151 + parent: 156 +- id: 153 kind: Literal span: 1:71-73 alias: start - parent: 155 -- id: 153 + parent: 156 +- id: 154 kind: Literal span: 1:75-77 alias: end - parent: 155 -- id: 155 + parent: 156 +- id: 156 kind: 'TransformCall: Take' span: 1:66-77 children: - - 151 - 152 - 153 - parent: 156 -- id: 156 + - 154 + parent: 157 +- id: 157 kind: 'TransformCall: Append' span: 1:78-172 children: - - 155 - - 136 - parent: 160 -- id: 157 + - 156 + - 137 + parent: 161 +- id: 158 kind: Ident span: 1:182-197 ident: !Ident @@ -320,9 +320,9 @@ nodes: - invoices - billing_country targets: - - 149 - parent: 159 -- id: 158 + - 150 + parent: 160 +- id: 159 kind: Ident span: 1:199-209 ident: !Ident @@ -330,21 +330,21 @@ nodes: - invoices - invoice_id targets: - - 148 - parent: 159 -- id: 159 + - 149 + parent: 160 +- id: 160 kind: Tuple span: 1:180-211 children: - - 157 - 158 - parent: 160 -- id: 160 + - 159 + parent: 161 +- id: 161 kind: 'TransformCall: Select' span: 1:173-211 children: - - 156 - - 159 + - 157 + - 160 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_compute.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_compute.snap index 4b22a8950df0..7ae27c22007f 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_compute.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_compute.snap @@ -7,15 +7,15 @@ frames: - - 1:14-74 - columns: - !All - input_id: 163 + input_id: 164 except: [] - !Single name: - total - target_id: 165 + target_id: 166 target_name: null inputs: - - id: 163 + - id: 164 name: invoices table: - default_db @@ -26,21 +26,21 @@ frames: name: - invoices - customer_id - target_id: 178 + target_id: 179 target_name: null - !Single name: - invoices - invoice_id - target_id: 179 + target_id: 180 target_name: null - !Single name: - total - target_id: 180 + target_id: 181 target_name: null inputs: - - id: 163 + - id: 164 name: invoices table: - default_db @@ -51,21 +51,21 @@ frames: name: - invoices - customer_id - target_id: 178 + target_id: 179 target_name: null - !Single name: - invoices - invoice_id - target_id: 179 + target_id: 180 target_name: null - !Single name: - total - target_id: 180 + target_id: 181 target_name: null inputs: - - id: 163 + - id: 164 name: invoices table: - default_db @@ -73,15 +73,15 @@ frames: - - 1:156-235 - columns: - !All - input_id: 129 + input_id: 130 except: [] - !Single name: - unit_price - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 129 + - id: 130 name: invoice_items table: - default_db @@ -92,21 +92,21 @@ frames: name: - invoice_items - invoice_line_id - target_id: 144 + target_id: 145 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 145 + target_id: 146 target_name: null - !Single name: - unit_price - target_id: 146 + target_id: 147 target_name: null inputs: - - id: 129 + - id: 130 name: invoice_items table: - default_db @@ -117,21 +117,21 @@ frames: name: - invoice_items - invoice_line_id - target_id: 144 + target_id: 145 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 145 + target_id: 146 target_name: null - !Single name: - unit_price - target_id: 146 + target_id: 147 target_name: null inputs: - - id: 129 + - id: 130 name: invoice_items table: - default_db @@ -142,26 +142,26 @@ frames: name: - invoices - customer_id - target_id: 178 + target_id: 179 target_name: null - !Single name: - invoices - invoice_id - target_id: 179 + target_id: 180 target_name: null - !Single name: - total - target_id: 180 + target_id: 181 target_name: null inputs: - - id: 163 + - id: 164 name: invoices table: - default_db - invoices - - id: 129 + - id: 130 name: invoice_items table: - default_db @@ -171,49 +171,49 @@ frames: - !Single name: - a - target_id: 187 + target_id: 188 target_name: null - !Single name: - b - target_id: 191 + target_id: 192 target_name: null inputs: - - id: 163 + - id: 164 name: invoices table: - default_db - invoices - - id: 129 + - id: 130 name: invoice_items table: - default_db - invoice_items nodes: -- id: 129 +- id: 130 kind: Ident span: 1:135-153 ident: !Ident - default_db - invoice_items - parent: 143 -- id: 131 + parent: 144 +- id: 132 kind: Case span: 1:176-235 alias: unit_price targets: - - 132 - - 136 - - 140 + - 133 + - 137 - 141 - parent: 142 -- id: 132 + - 142 + parent: 143 +- id: 133 kind: RqOperator span: 1:182-196 targets: - - 134 - 135 -- id: 134 + - 136 +- id: 135 kind: Ident span: 1:182-192 ident: !Ident @@ -221,17 +221,17 @@ nodes: - invoice_items - unit_price targets: - - 129 -- id: 135 + - 130 +- id: 136 kind: Literal span: 1:195-196 -- id: 136 +- id: 137 kind: RqOperator span: 1:200-214 targets: - - 138 - 139 -- id: 138 + - 140 +- id: 139 kind: Ident span: 1:200-210 ident: !Ident @@ -239,14 +239,14 @@ nodes: - invoice_items - unit_price targets: - - 129 -- id: 139 + - 130 +- id: 140 kind: Literal span: 1:213-214 -- id: 140 +- id: 141 kind: Literal span: 1:216-220 -- id: 141 +- id: 142 kind: Ident span: 1:224-234 ident: !Ident @@ -254,21 +254,21 @@ nodes: - invoice_items - unit_price targets: - - 129 -- id: 142 + - 130 +- id: 143 kind: Tuple span: 1:176-235 children: - - 131 - parent: 143 -- id: 143 + - 132 + parent: 144 +- id: 144 kind: 'TransformCall: Derive' span: 1:156-235 children: - - 129 - - 142 - parent: 148 -- id: 144 + - 130 + - 143 + parent: 149 +- id: 145 kind: Ident span: 1:247-262 ident: !Ident @@ -276,9 +276,9 @@ nodes: - invoice_items - invoice_line_id targets: - - 129 - parent: 147 -- id: 145 + - 130 + parent: 148 +- id: 146 kind: Ident span: 1:264-274 ident: !Ident @@ -286,66 +286,66 @@ nodes: - invoice_items - invoice_id targets: - - 129 - parent: 147 -- id: 146 + - 130 + parent: 148 +- id: 147 kind: Ident span: 1:276-286 ident: !Ident - this - unit_price targets: - - 131 - parent: 147 -- id: 147 + - 132 + parent: 148 +- id: 148 kind: Tuple span: 1:245-288 children: - - 144 - 145 - 146 - parent: 148 -- id: 148 + - 147 + parent: 149 +- id: 149 kind: 'TransformCall: Select' span: 1:238-288 children: - - 143 - - 147 - parent: 150 -- id: 150 + - 144 + - 148 + parent: 151 +- id: 151 kind: 'TransformCall: Take' span: 1:291-297 children: - - 148 - - 151 - parent: 186 -- id: 151 + - 149 + - 152 + parent: 187 +- id: 152 kind: Literal - parent: 150 -- id: 163 + parent: 151 +- id: 164 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 177 -- id: 165 + parent: 178 +- id: 166 kind: Case span: 1:29-74 alias: total targets: - - 166 - - 170 - - 174 + - 167 + - 171 - 175 - parent: 176 -- id: 166 + - 176 + parent: 177 +- id: 167 kind: RqOperator span: 1:35-45 targets: - - 168 - 169 -- id: 168 + - 170 +- id: 169 kind: Ident span: 1:35-40 ident: !Ident @@ -353,17 +353,17 @@ nodes: - invoices - total targets: - - 163 -- id: 169 + - 164 +- id: 170 kind: Literal span: 1:43-45 -- id: 170 +- id: 171 kind: RqOperator span: 1:49-58 targets: - - 172 - 173 -- id: 172 + - 174 +- id: 173 kind: Ident span: 1:49-54 ident: !Ident @@ -371,14 +371,14 @@ nodes: - invoices - total targets: - - 163 -- id: 173 + - 164 +- id: 174 kind: Literal span: 1:57-58 -- id: 174 +- id: 175 kind: Literal span: 1:60-64 -- id: 175 +- id: 176 kind: Ident span: 1:68-73 ident: !Ident @@ -386,21 +386,21 @@ nodes: - invoices - total targets: - - 163 -- id: 176 + - 164 +- id: 177 kind: Tuple span: 1:29-74 children: - - 165 - parent: 177 -- id: 177 + - 166 + parent: 178 +- id: 178 kind: 'TransformCall: Derive' span: 1:14-74 children: - - 163 - - 176 - parent: 182 -- id: 178 + - 164 + - 177 + parent: 183 +- id: 179 kind: Ident span: 1:84-95 ident: !Ident @@ -408,9 +408,9 @@ nodes: - invoices - customer_id targets: - - 163 - parent: 181 -- id: 179 + - 164 + parent: 182 +- id: 180 kind: Ident span: 1:97-107 ident: !Ident @@ -418,58 +418,58 @@ nodes: - invoices - invoice_id targets: - - 163 - parent: 181 -- id: 180 + - 164 + parent: 182 +- id: 181 kind: Ident span: 1:109-114 ident: !Ident - this - total targets: - - 165 - parent: 181 -- id: 181 + - 166 + parent: 182 +- id: 182 kind: Tuple span: 1:82-116 children: - - 178 - 179 - 180 - parent: 182 -- id: 182 + - 181 + parent: 183 +- id: 183 kind: 'TransformCall: Select' span: 1:75-116 children: - - 177 - - 181 - parent: 184 -- id: 184 + - 178 + - 182 + parent: 185 +- id: 185 kind: 'TransformCall: Take' span: 1:117-123 children: - - 182 - - 185 - parent: 186 -- id: 185 - kind: Literal - parent: 184 + - 183 + - 186 + parent: 187 - id: 186 + kind: Literal + parent: 185 +- id: 187 kind: 'TransformCall: Append' span: 1:124-299 children: - - 184 - - 150 - parent: 199 -- id: 187 + - 185 + - 151 + parent: 200 +- id: 188 kind: RqOperator span: 1:313-328 alias: a targets: - - 189 - 190 - parent: 198 -- id: 189 + - 191 + parent: 199 +- id: 190 kind: Ident span: 1:313-324 ident: !Ident @@ -477,28 +477,28 @@ nodes: - invoices - customer_id targets: - - 178 -- id: 190 + - 179 +- id: 191 kind: Literal span: 1:327-328 -- id: 191 +- id: 192 kind: RqOperator span: 1:334-367 alias: b targets: - - 193 - 194 - parent: 198 -- id: 193 + - 195 + parent: 199 +- id: 194 kind: Literal span: 1:345-346 -- id: 194 +- id: 195 kind: RqOperator span: 1:348-366 targets: - - 196 - 197 -- id: 196 + - 198 +- id: 197 kind: Ident span: 1:348-358 ident: !Ident @@ -506,28 +506,28 @@ nodes: - invoices - invoice_id targets: - - 179 -- id: 197 + - 180 +- id: 198 kind: Ident span: 1:361-366 ident: !Ident - this - total targets: - - 180 -- id: 198 + - 181 +- id: 199 kind: Tuple span: 1:307-369 children: - - 187 - - 191 - parent: 199 -- id: 199 + - 188 + - 192 + parent: 200 +- id: 200 kind: 'TransformCall: Select' span: 1:300-369 children: - - 186 - - 198 + - 187 + - 199 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_multiple_with_null.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_multiple_with_null.snap index 421a1505c0f5..feb63ea110c5 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_multiple_with_null.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_multiple_with_null.snap @@ -10,22 +10,22 @@ frames: name: - invoices - customer_id - target_id: 167 + target_id: 168 target_name: null - !Single name: - invoices - invoice_id - target_id: 168 + target_id: 169 target_name: null - !Single name: - invoices - billing_country - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db @@ -36,22 +36,22 @@ frames: name: - invoices - customer_id - target_id: 167 + target_id: 168 target_name: null - !Single name: - invoices - invoice_id - target_id: 168 + target_id: 169 target_name: null - !Single name: - invoices - billing_country - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db @@ -60,22 +60,22 @@ frames: - columns: - !Single name: null - target_id: 149 + target_id: 150 target_name: null - !Single name: - employees - employee_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - employees - country - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 147 + - id: 148 name: employees table: - default_db @@ -84,22 +84,22 @@ frames: - columns: - !Single name: null - target_id: 149 + target_id: 150 target_name: null - !Single name: - employees - employee_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - employees - country - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 147 + - id: 148 name: employees table: - default_db @@ -110,27 +110,27 @@ frames: name: - invoices - customer_id - target_id: 167 + target_id: 168 target_name: null - !Single name: - invoices - invoice_id - target_id: 168 + target_id: 169 target_name: null - !Single name: - invoices - billing_country - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db - invoices - - id: 147 + - id: 148 name: employees table: - default_db @@ -141,20 +141,20 @@ frames: name: - invoice_items - invoice_line_id - target_id: 128 + target_id: 129 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 129 + target_id: 130 target_name: null - !Single name: null - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 + - id: 127 name: invoice_items table: - default_db @@ -165,20 +165,20 @@ frames: name: - invoice_items - invoice_line_id - target_id: 128 + target_id: 129 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 129 + target_id: 130 target_name: null - !Single name: null - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 + - id: 127 name: invoice_items table: - default_db @@ -189,32 +189,32 @@ frames: name: - invoices - customer_id - target_id: 167 + target_id: 168 target_name: null - !Single name: - invoices - invoice_id - target_id: 168 + target_id: 169 target_name: null - !Single name: - invoices - billing_country - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db - invoices - - id: 147 + - id: 148 name: employees table: - default_db - employees - - id: 126 + - id: 127 name: invoice_items table: - default_db @@ -225,39 +225,39 @@ frames: name: - invoices - billing_country - target_id: 177 + target_id: 178 target_name: null - !Single name: - invoices - invoice_id - target_id: 178 + target_id: 179 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db - invoices - - id: 147 + - id: 148 name: employees table: - default_db - employees - - id: 126 + - id: 127 name: invoice_items table: - default_db - invoice_items nodes: -- id: 126 +- id: 127 kind: Ident span: 1:168-186 ident: !Ident - default_db - invoice_items - parent: 132 -- id: 128 + parent: 133 +- id: 129 kind: Ident span: 1:198-213 ident: !Ident @@ -265,9 +265,9 @@ nodes: - invoice_items - invoice_line_id targets: - - 126 - parent: 131 -- id: 129 + - 127 + parent: 132 +- id: 130 kind: Ident span: 1:215-225 ident: !Ident @@ -275,45 +275,45 @@ nodes: - invoice_items - invoice_id targets: - - 126 - parent: 131 -- id: 130 + - 127 + parent: 132 +- id: 131 kind: Literal span: 1:227-231 - parent: 131 -- id: 131 + parent: 132 +- id: 132 kind: Tuple span: 1:196-233 children: - - 128 - 129 - 130 - parent: 132 -- id: 132 + - 131 + parent: 133 +- id: 133 kind: 'TransformCall: Select' span: 1:189-233 children: - - 126 - - 131 - parent: 134 -- id: 134 + - 127 + - 132 + parent: 135 +- id: 135 kind: 'TransformCall: Take' span: 1:236-242 children: - - 132 - - 135 - parent: 176 -- id: 135 + - 133 + - 136 + parent: 177 +- id: 136 kind: Literal - parent: 134 -- id: 147 + parent: 135 +- id: 148 kind: Ident span: 1:84-98 ident: !Ident - default_db - employees - parent: 153 -- id: 149 + parent: 154 +- id: 150 kind: Ident span: 1:110-121 ident: !Ident @@ -321,9 +321,9 @@ nodes: - employees - employee_id targets: - - 147 - parent: 152 -- id: 150 + - 148 + parent: 153 +- id: 151 kind: Ident span: 1:123-134 ident: !Ident @@ -331,9 +331,9 @@ nodes: - employees - employee_id targets: - - 147 - parent: 152 -- id: 151 + - 148 + parent: 153 +- id: 152 kind: Ident span: 1:136-143 ident: !Ident @@ -341,41 +341,41 @@ nodes: - employees - country targets: - - 147 - parent: 152 -- id: 152 + - 148 + parent: 153 +- id: 153 kind: Tuple span: 1:108-145 children: - - 149 - 150 - 151 - parent: 153 -- id: 153 + - 152 + parent: 154 +- id: 154 kind: 'TransformCall: Select' span: 1:101-145 children: - - 147 - - 152 - parent: 155 -- id: 155 + - 148 + - 153 + parent: 156 +- id: 156 kind: 'TransformCall: Take' span: 1:148-154 children: - - 153 - - 156 - parent: 175 -- id: 156 + - 154 + - 157 + parent: 176 +- id: 157 kind: Literal - parent: 155 -- id: 165 + parent: 156 +- id: 166 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 171 -- id: 167 + parent: 172 +- id: 168 kind: Ident span: 1:23-34 ident: !Ident @@ -383,9 +383,9 @@ nodes: - invoices - customer_id targets: - - 165 - parent: 170 -- id: 168 + - 166 + parent: 171 +- id: 169 kind: Ident span: 1:36-46 ident: !Ident @@ -393,9 +393,9 @@ nodes: - invoices - invoice_id targets: - - 165 - parent: 170 -- id: 169 + - 166 + parent: 171 +- id: 170 kind: Ident span: 1:48-63 ident: !Ident @@ -403,48 +403,48 @@ nodes: - invoices - billing_country targets: - - 165 - parent: 170 -- id: 170 + - 166 + parent: 171 +- id: 171 kind: Tuple span: 1:21-65 children: - - 167 - 168 - 169 - parent: 171 -- id: 171 + - 170 + parent: 172 +- id: 172 kind: 'TransformCall: Select' span: 1:14-65 children: - - 165 - - 170 - parent: 173 -- id: 173 + - 166 + - 171 + parent: 174 +- id: 174 kind: 'TransformCall: Take' span: 1:66-72 children: - - 171 - - 174 - parent: 175 -- id: 174 - kind: Literal - parent: 173 + - 172 + - 175 + parent: 176 - id: 175 + kind: Literal + parent: 174 +- id: 176 kind: 'TransformCall: Append' span: 1:73-156 children: - - 173 - - 155 - parent: 176 -- id: 176 + - 174 + - 156 + parent: 177 +- id: 177 kind: 'TransformCall: Append' span: 1:157-244 children: - - 175 - - 134 - parent: 180 -- id: 177 + - 176 + - 135 + parent: 181 +- id: 178 kind: Ident span: 1:254-269 ident: !Ident @@ -452,9 +452,9 @@ nodes: - invoices - billing_country targets: - - 169 - parent: 179 -- id: 178 + - 170 + parent: 180 +- id: 179 kind: Ident span: 1:271-281 ident: !Ident @@ -462,21 +462,21 @@ nodes: - invoices - invoice_id targets: - - 168 - parent: 179 -- id: 179 + - 169 + parent: 180 +- id: 180 kind: Tuple span: 1:252-283 children: - - 177 - 178 - parent: 180 -- id: 180 + - 179 + parent: 181 +- id: 181 kind: 'TransformCall: Select' span: 1:245-283 children: - - 176 - - 179 + - 177 + - 180 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_nulls.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_nulls.snap index 927ccffb3aaa..3b99f97e1c83 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_nulls.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_nulls.snap @@ -9,15 +9,15 @@ frames: - !Single name: - an_id - target_id: 142 + target_id: 143 target_name: null - !Single name: - name - target_id: 143 + target_id: 144 target_name: null inputs: - - id: 140 + - id: 141 name: invoices table: - default_db @@ -27,15 +27,15 @@ frames: - !Single name: - an_id - target_id: 142 + target_id: 143 target_name: null - !Single name: - name - target_id: 143 + target_id: 144 target_name: null inputs: - - id: 140 + - id: 141 name: invoices table: - default_db @@ -45,15 +45,15 @@ frames: - !Single name: - an_id - target_id: 125 + target_id: 126 target_name: null - !Single name: - name - target_id: 126 + target_id: 127 target_name: null inputs: - - id: 123 + - id: 124 name: employees table: - default_db @@ -63,15 +63,15 @@ frames: - !Single name: - an_id - target_id: 125 + target_id: 126 target_name: null - !Single name: - name - target_id: 126 + target_id: 127 target_name: null inputs: - - id: 123 + - id: 124 name: employees table: - default_db @@ -81,38 +81,38 @@ frames: - !Single name: - an_id - target_id: 142 + target_id: 143 target_name: null - !Single name: - name - target_id: 143 + target_id: 144 target_name: null inputs: - - id: 140 + - id: 141 name: invoices table: - default_db - invoices - - id: 123 + - id: 124 name: employees table: - default_db - employees nodes: -- id: 123 +- id: 124 kind: Ident span: 1:73-87 ident: !Ident - default_db - employees - parent: 128 -- id: 125 + parent: 129 +- id: 126 kind: Literal span: 1:106-110 alias: an_id - parent: 127 -- id: 126 + parent: 128 +- id: 127 kind: Ident span: 1:119-129 alias: name @@ -121,40 +121,40 @@ nodes: - employees - first_name targets: - - 123 - parent: 127 -- id: 127 + - 124 + parent: 128 +- id: 128 kind: Tuple span: 1:97-130 children: - - 125 - 126 - parent: 128 -- id: 128 + - 127 + parent: 129 +- id: 129 kind: 'TransformCall: Select' span: 1:90-130 children: - - 123 - - 127 - parent: 130 -- id: 130 + - 124 + - 128 + parent: 131 +- id: 131 kind: 'TransformCall: Take' span: 1:133-139 children: - - 128 - - 131 - parent: 149 -- id: 131 + - 129 + - 132 + parent: 150 +- id: 132 kind: Literal - parent: 130 -- id: 140 + parent: 131 +- id: 141 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 145 -- id: 142 + parent: 146 +- id: 143 kind: Ident span: 1:30-40 alias: an_id @@ -163,43 +163,43 @@ nodes: - invoices - invoice_id targets: - - 140 - parent: 144 -- id: 143 + - 141 + parent: 145 +- id: 144 kind: Literal span: 1:49-53 alias: name - parent: 144 -- id: 144 + parent: 145 +- id: 145 kind: Tuple span: 1:21-54 children: - - 142 - 143 - parent: 145 -- id: 145 + - 144 + parent: 146 +- id: 146 kind: 'TransformCall: Select' span: 1:14-54 children: - - 140 - - 144 - parent: 147 -- id: 147 + - 141 + - 145 + parent: 148 +- id: 148 kind: 'TransformCall: Take' span: 1:55-61 children: - - 145 - - 148 - parent: 149 -- id: 148 - kind: Literal - parent: 147 + - 146 + - 149 + parent: 150 - id: 149 + kind: Literal + parent: 148 +- id: 150 kind: 'TransformCall: Append' span: 1:62-141 children: - - 147 - - 130 + - 148 + - 131 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_simple.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_simple.snap index cd71056aaae1..bbd4f0cf1613 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_simple.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__append_select_simple.snap @@ -10,16 +10,16 @@ frames: name: - invoices - invoice_id - target_id: 139 + target_id: 140 target_name: null - !Single name: - invoices - billing_country - target_id: 140 + target_id: 141 target_name: null inputs: - - id: 137 + - id: 138 name: invoices table: - default_db @@ -29,16 +29,16 @@ frames: - !Single name: - invoice_id - target_id: 125 + target_id: 126 target_name: null - !Single name: - invoices - billing_country - target_id: 129 + target_id: 130 target_name: null inputs: - - id: 123 + - id: 124 name: invoices table: - default_db @@ -49,21 +49,21 @@ frames: name: - invoices - invoice_id - target_id: 139 + target_id: 140 target_name: null - !Single name: - invoices - billing_country - target_id: 140 + target_id: 141 target_name: null inputs: - - id: 137 + - id: 138 name: invoices table: - default_db - invoices - - id: 123 + - id: 124 name: invoices table: - default_db @@ -74,42 +74,42 @@ frames: name: - invoices - invoice_id - target_id: 139 + target_id: 140 target_name: null - !Single name: - invoices - billing_country - target_id: 140 + target_id: 141 target_name: null inputs: - - id: 137 + - id: 138 name: invoices table: - default_db - invoices - - id: 123 + - id: 124 name: invoices table: - default_db - invoices nodes: -- id: 123 +- id: 124 kind: Ident span: 1:64-77 ident: !Ident - default_db - invoices - parent: 131 -- id: 125 + parent: 132 +- id: 126 kind: RqOperator span: 1:102-120 alias: invoice_id targets: - - 127 - 128 - parent: 130 -- id: 127 + - 129 + parent: 131 +- id: 128 kind: Ident span: 1:102-114 ident: !Ident @@ -117,11 +117,11 @@ nodes: - invoices - invoice_id targets: - - 123 -- id: 128 + - 124 +- id: 129 kind: Literal span: 1:117-120 -- id: 129 +- id: 130 kind: Ident span: 1:122-137 ident: !Ident @@ -129,30 +129,30 @@ nodes: - invoices - billing_country targets: - - 123 - parent: 130 -- id: 130 + - 124 + parent: 131 +- id: 131 kind: Tuple span: 1:87-139 children: - - 125 - - 129 - parent: 131 -- id: 131 + - 126 + - 130 + parent: 132 +- id: 132 kind: 'TransformCall: Select' span: 1:80-139 children: - - 123 - - 130 - parent: 143 -- id: 137 + - 124 + - 131 + parent: 144 +- id: 138 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 142 -- id: 139 + parent: 143 +- id: 140 kind: Ident span: 1:23-33 ident: !Ident @@ -160,9 +160,9 @@ nodes: - invoices - invoice_id targets: - - 137 - parent: 141 -- id: 140 + - 138 + parent: 142 +- id: 141 kind: Ident span: 1:35-50 ident: !Ident @@ -170,40 +170,40 @@ nodes: - invoices - billing_country targets: - - 137 - parent: 141 -- id: 141 + - 138 + parent: 142 +- id: 142 kind: Tuple span: 1:21-52 children: - - 139 - 140 - parent: 142 -- id: 142 - kind: 'TransformCall: Select' - span: 1:14-52 - children: - - 137 - 141 parent: 143 - id: 143 - kind: 'TransformCall: Append' - span: 1:53-141 + kind: 'TransformCall: Select' + span: 1:14-52 children: + - 138 - 142 - - 131 - parent: 149 + parent: 144 - id: 144 + kind: 'TransformCall: Append' + span: 1:53-141 + children: + - 143 + - 132 + parent: 150 +- id: 145 kind: RqOperator span: 1:168-189 targets: - - 147 - 148 - parent: 149 -- id: 147 + - 149 + parent: 150 +- id: 148 kind: Literal span: 1:185-188 -- id: 148 +- id: 149 kind: Ident span: 1:150-165 ident: !Ident @@ -211,13 +211,13 @@ nodes: - invoices - billing_country targets: - - 140 -- id: 149 + - 141 +- id: 150 kind: 'TransformCall: Filter' span: 1:142-190 children: - - 143 - 144 + - 145 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__arithmetic.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__arithmetic.snap index 77f9ce795edd..c4254d6fc762 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__arithmetic.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__arithmetic.snap @@ -8,875 +8,875 @@ frames: - columns: - !Single name: - - _literal_120 + - _literal_121 - id - target_id: 162 + target_id: 163 target_name: null - !Single name: null - target_id: 163 + target_id: 164 target_name: null - !Single name: null - target_id: 167 + target_id: 168 target_name: null - !Single name: null - target_id: 171 + target_id: 172 target_name: null - !Single name: null - target_id: 175 + target_id: 176 target_name: null - !Single name: - q_ii - target_id: 179 + target_id: 180 target_name: null - !Single name: - q_if - target_id: 183 + target_id: 184 target_name: null - !Single name: - q_fi - target_id: 187 + target_id: 188 target_name: null - !Single name: - q_ff - target_id: 191 + target_id: 192 target_name: null - !Single name: - r_ii - target_id: 195 + target_id: 196 target_name: null - !Single name: - r_if - target_id: 199 + target_id: 200 target_name: null - !Single name: - r_fi - target_id: 203 + target_id: 204 target_name: null - !Single name: - r_ff - target_id: 207 + target_id: 208 target_name: null - !Single name: null - target_id: 211 + target_id: 212 target_name: null - !Single name: null - target_id: 222 + target_id: 223 target_name: null - !Single name: null - target_id: 233 + target_id: 234 target_name: null - !Single name: null - target_id: 244 + target_id: 245 target_name: null inputs: - - id: 120 - name: _literal_120 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 - - 1:825-832 - columns: - !Single name: - - _literal_120 + - _literal_121 - id - target_id: 162 + target_id: 163 target_name: null - !Single name: null - target_id: 163 + target_id: 164 target_name: null - !Single name: null - target_id: 167 + target_id: 168 target_name: null - !Single name: null - target_id: 171 + target_id: 172 target_name: null - !Single name: null - target_id: 175 + target_id: 176 target_name: null - !Single name: - q_ii - target_id: 179 + target_id: 180 target_name: null - !Single name: - q_if - target_id: 183 + target_id: 184 target_name: null - !Single name: - q_fi - target_id: 187 + target_id: 188 target_name: null - !Single name: - q_ff - target_id: 191 + target_id: 192 target_name: null - !Single name: - r_ii - target_id: 195 + target_id: 196 target_name: null - !Single name: - r_if - target_id: 199 + target_id: 200 target_name: null - !Single name: - r_fi - target_id: 203 + target_id: 204 target_name: null - !Single name: - r_ff - target_id: 207 + target_id: 208 target_name: null - !Single name: null - target_id: 211 + target_id: 212 target_name: null - !Single name: null - target_id: 222 + target_id: 223 target_name: null - !Single name: null - target_id: 233 + target_id: 234 target_name: null - !Single name: null - target_id: 244 + target_id: 245 target_name: null inputs: - - id: 120 - name: _literal_120 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 nodes: -- id: 120 +- id: 121 kind: Array span: 1:13-317 children: - - 121 - - 127 - - 137 - - 147 - parent: 256 -- id: 121 + - 122 + - 128 + - 138 + - 148 + parent: 257 +- id: 122 kind: Tuple span: 1:24-92 children: - - 122 - 123 - 124 - 125 - 126 - parent: 120 -- id: 122 + - 127 + parent: 121 +- id: 123 kind: Literal span: 1:31-32 alias: id - parent: 121 -- id: 123 + parent: 122 +- id: 124 kind: Literal span: 1:43-45 alias: x_int - parent: 121 -- id: 124 + parent: 122 +- id: 125 kind: Literal span: 1:58-62 alias: x_float - parent: 121 -- id: 125 + parent: 122 +- id: 126 kind: Literal span: 1:73-74 alias: k_int - parent: 121 -- id: 126 + parent: 122 +- id: 127 kind: Literal span: 1:87-90 alias: k_float - parent: 121 -- id: 127 + parent: 122 +- id: 128 kind: Tuple span: 1:98-166 children: - - 128 - 129 - - 132 - - 135 + - 130 + - 133 - 136 - parent: 120 -- id: 128 + - 137 + parent: 121 +- id: 129 kind: Literal span: 1:105-106 alias: id - parent: 127 -- id: 129 + parent: 128 +- id: 130 kind: Literal span: 1:116-119 alias: x_int - parent: 127 -- id: 132 + parent: 128 +- id: 133 kind: Literal span: 1:131-136 alias: x_float - parent: 127 -- id: 135 + parent: 128 +- id: 136 kind: Literal span: 1:147-148 alias: k_int - parent: 127 -- id: 136 + parent: 128 +- id: 137 kind: Literal span: 1:161-164 alias: k_float - parent: 127 -- id: 137 + parent: 128 +- id: 138 kind: Tuple span: 1:172-240 children: - - 138 - 139 - 140 - 141 - - 144 - parent: 120 -- id: 138 + - 142 + - 145 + parent: 121 +- id: 139 kind: Literal span: 1:179-180 alias: id - parent: 137 -- id: 139 + parent: 138 +- id: 140 kind: Literal span: 1:191-193 alias: x_int - parent: 137 -- id: 140 + parent: 138 +- id: 141 kind: Literal span: 1:206-210 alias: x_float - parent: 137 -- id: 141 + parent: 138 +- id: 142 kind: Literal span: 1:220-222 alias: k_int - parent: 137 -- id: 144 + parent: 138 +- id: 145 kind: Literal span: 1:234-238 alias: k_float - parent: 137 -- id: 147 + parent: 138 +- id: 148 kind: Tuple span: 1:246-314 children: - - 148 - 149 - - 152 - - 155 - - 158 - parent: 120 -- id: 148 + - 150 + - 153 + - 156 + - 159 + parent: 121 +- id: 149 kind: Literal span: 1:253-254 alias: id - parent: 147 -- id: 149 + parent: 148 +- id: 150 kind: Literal span: 1:264-267 alias: x_int - parent: 147 -- id: 152 + parent: 148 +- id: 153 kind: Literal span: 1:279-284 alias: x_float - parent: 147 -- id: 155 + parent: 148 +- id: 156 kind: Literal span: 1:294-296 alias: k_int - parent: 147 -- id: 158 + parent: 148 +- id: 159 kind: Literal span: 1:308-312 alias: k_float - parent: 147 -- id: 162 + parent: 148 +- id: 163 kind: Ident span: 1:331-333 ident: !Ident - this - - _literal_120 + - _literal_121 - id targets: - - 120 - parent: 255 -- id: 163 + - 121 + parent: 256 +- id: 164 kind: RqOperator span: 1:340-353 targets: - - 165 - 166 - parent: 255 -- id: 165 + - 167 + parent: 256 +- id: 166 kind: Ident span: 1:340-345 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 166 + - 121 +- id: 167 kind: Ident span: 1:348-353 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 167 + - 121 +- id: 168 kind: RqOperator span: 1:359-374 targets: - - 169 - 170 - parent: 255 -- id: 169 + - 171 + parent: 256 +- id: 170 kind: Ident span: 1:359-364 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 170 + - 121 +- id: 171 kind: Ident span: 1:367-374 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 171 + - 121 +- id: 172 kind: RqOperator span: 1:380-395 targets: - - 173 - 174 - parent: 255 -- id: 173 + - 175 + parent: 256 +- id: 174 kind: Ident span: 1:380-387 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 174 + - 121 +- id: 175 kind: Ident span: 1:390-395 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 175 + - 121 +- id: 176 kind: RqOperator span: 1:401-418 targets: - - 177 - 178 - parent: 255 -- id: 177 + - 179 + parent: 256 +- id: 178 kind: Ident span: 1:401-408 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 178 + - 121 +- id: 179 kind: Ident span: 1:411-418 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 179 + - 121 +- id: 180 kind: RqOperator span: 1:432-446 alias: q_ii targets: - - 181 - 182 - parent: 255 -- id: 181 + - 183 + parent: 256 +- id: 182 kind: Ident span: 1:432-437 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 182 + - 121 +- id: 183 kind: Ident span: 1:441-446 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 183 + - 121 +- id: 184 kind: RqOperator span: 1:459-475 alias: q_if targets: - - 185 - 186 - parent: 255 -- id: 185 + - 187 + parent: 256 +- id: 186 kind: Ident span: 1:459-464 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 186 + - 121 +- id: 187 kind: Ident span: 1:468-475 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 187 + - 121 +- id: 188 kind: RqOperator span: 1:488-504 alias: q_fi targets: - - 189 - 190 - parent: 255 -- id: 189 + - 191 + parent: 256 +- id: 190 kind: Ident span: 1:488-495 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 190 + - 121 +- id: 191 kind: Ident span: 1:499-504 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 191 + - 121 +- id: 192 kind: RqOperator span: 1:517-535 alias: q_ff targets: - - 193 - 194 - parent: 255 -- id: 193 + - 195 + parent: 256 +- id: 194 kind: Ident span: 1:517-524 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 194 + - 121 +- id: 195 kind: Ident span: 1:528-535 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 195 + - 121 +- id: 196 kind: RqOperator span: 1:549-562 alias: r_ii targets: - - 197 - 198 - parent: 255 -- id: 197 + - 199 + parent: 256 +- id: 198 kind: Ident span: 1:549-554 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 198 + - 121 +- id: 199 kind: Ident span: 1:557-562 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 199 + - 121 +- id: 200 kind: RqOperator span: 1:575-590 alias: r_if targets: - - 201 - 202 - parent: 255 -- id: 201 + - 203 + parent: 256 +- id: 202 kind: Ident span: 1:575-580 ident: !Ident - this - - _literal_120 + - _literal_121 - x_int targets: - - 120 -- id: 202 + - 121 +- id: 203 kind: Ident span: 1:583-590 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 203 + - 121 +- id: 204 kind: RqOperator span: 1:603-618 alias: r_fi targets: - - 205 - 206 - parent: 255 -- id: 205 + - 207 + parent: 256 +- id: 206 kind: Ident span: 1:603-610 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 206 + - 121 +- id: 207 kind: Ident span: 1:613-618 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 207 + - 121 +- id: 208 kind: RqOperator span: 1:631-648 alias: r_ff targets: - - 209 - 210 - parent: 255 -- id: 209 + - 211 + parent: 256 +- id: 210 kind: Ident span: 1:631-638 ident: !Ident - this - - _literal_120 + - _literal_121 - x_float targets: - - 120 -- id: 210 + - 121 +- id: 211 kind: Ident span: 1:641-648 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 211 + - 121 +- id: 212 kind: RqOperator span: 1:678-690 targets: - - 214 - 215 - parent: 255 -- id: 214 + - 216 + parent: 256 +- id: 215 kind: Literal span: 1:689-690 -- id: 215 +- id: 216 kind: RqOperator span: 1:656-675 targets: - - 217 - - 221 -- id: 217 + - 218 + - 222 +- id: 218 kind: RqOperator span: 1:656-668 targets: - - 219 - 220 -- id: 219 + - 221 +- id: 220 kind: Ident span: 1:656-660 ident: !Ident - this - q_ii targets: - - 179 -- id: 220 + - 180 +- id: 221 kind: Ident span: 1:663-668 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 221 + - 121 +- id: 222 kind: Ident span: 1:671-675 ident: !Ident - this - r_ii targets: - - 195 -- id: 222 + - 196 +- id: 223 kind: RqOperator span: 1:722-734 targets: - - 225 - 226 - parent: 255 -- id: 225 + - 227 + parent: 256 +- id: 226 kind: Literal span: 1:733-734 -- id: 226 +- id: 227 kind: RqOperator span: 1:698-719 targets: - - 228 - - 232 -- id: 228 + - 229 + - 233 +- id: 229 kind: RqOperator span: 1:698-712 targets: - - 230 - 231 -- id: 230 + - 232 +- id: 231 kind: Ident span: 1:698-702 ident: !Ident - this - q_if targets: - - 183 -- id: 231 + - 184 +- id: 232 kind: Ident span: 1:705-712 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 232 + - 121 +- id: 233 kind: Ident span: 1:715-719 ident: !Ident - this - r_if targets: - - 199 -- id: 233 + - 200 +- id: 234 kind: RqOperator span: 1:764-776 targets: - - 236 - 237 - parent: 255 -- id: 236 + - 238 + parent: 256 +- id: 237 kind: Literal span: 1:775-776 -- id: 237 +- id: 238 kind: RqOperator span: 1:742-761 targets: - - 239 - - 243 -- id: 239 + - 240 + - 244 +- id: 240 kind: RqOperator span: 1:742-754 targets: - - 241 - 242 -- id: 241 + - 243 +- id: 242 kind: Ident span: 1:742-746 ident: !Ident - this - q_fi targets: - - 187 -- id: 242 + - 188 +- id: 243 kind: Ident span: 1:749-754 ident: !Ident - this - - _literal_120 + - _literal_121 - k_int targets: - - 120 -- id: 243 + - 121 +- id: 244 kind: Ident span: 1:757-761 ident: !Ident - this - r_fi targets: - - 203 -- id: 244 + - 204 +- id: 245 kind: RqOperator span: 1:808-820 targets: - - 247 - 248 - parent: 255 -- id: 247 + - 249 + parent: 256 +- id: 248 kind: Literal span: 1:819-820 -- id: 248 +- id: 249 kind: RqOperator span: 1:784-805 targets: - - 250 - - 254 -- id: 250 + - 251 + - 255 +- id: 251 kind: RqOperator span: 1:784-798 targets: - - 252 - 253 -- id: 252 + - 254 +- id: 253 kind: Ident span: 1:784-788 ident: !Ident - this - q_ff targets: - - 191 -- id: 253 + - 192 +- id: 254 kind: Ident span: 1:791-798 ident: !Ident - this - - _literal_120 + - _literal_121 - k_float targets: - - 120 -- id: 254 + - 121 +- id: 255 kind: Ident span: 1:801-805 ident: !Ident - this - r_ff targets: - - 207 -- id: 255 + - 208 +- id: 256 kind: Tuple span: 1:325-824 children: - - 162 - 163 - - 167 - - 171 - - 175 - - 179 - - 183 - - 187 - - 191 - - 195 - - 199 - - 203 - - 207 - - 211 - - 222 - - 233 - - 244 - parent: 256 -- id: 256 + - 164 + - 168 + - 172 + - 176 + - 180 + - 184 + - 188 + - 192 + - 196 + - 200 + - 204 + - 208 + - 212 + - 223 + - 234 + - 245 + parent: 257 +- id: 257 kind: 'TransformCall: Select' span: 1:318-824 children: - - 120 - - 255 - parent: 259 -- id: 257 + - 121 + - 256 + parent: 260 +- id: 258 kind: Ident span: 1:830-832 ident: !Ident - this - - _literal_120 + - _literal_121 - id targets: - - 162 - parent: 259 -- id: 259 + - 163 + parent: 260 +- id: 260 kind: 'TransformCall: Sort' span: 1:825-832 children: - - 256 - 257 + - 258 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__cast.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__cast.snap index f144f40c2077..4b4b7e6a1c67 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__cast.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__cast.snap @@ -7,10 +7,10 @@ frames: - - 1:25-38 - columns: - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -21,15 +21,15 @@ frames: name: - tracks - name - target_id: 130 + target_id: 131 target_name: null - !Single name: - bin - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -40,28 +40,28 @@ frames: name: - tracks - name - target_id: 130 + target_id: 131 target_name: null - !Single name: - bin - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 129 -- id: 127 + parent: 130 +- id: 128 kind: Ident span: 1:32-37 ident: !Ident @@ -69,16 +69,16 @@ nodes: - tracks - bytes targets: - - 123 - parent: 129 -- id: 129 + - 124 + parent: 130 +- id: 130 kind: 'TransformCall: Sort' span: 1:25-38 children: - - 123 - - 127 - parent: 139 -- id: 130 + - 124 + - 128 + parent: 140 +- id: 131 kind: Ident span: 1:52-56 ident: !Ident @@ -86,22 +86,22 @@ nodes: - tracks - name targets: - - 123 - parent: 138 -- id: 131 + - 124 + parent: 139 +- id: 132 kind: RqOperator span: 1:68-95 alias: bin targets: - - 133 - - 137 - parent: 138 -- id: 133 + - 134 + - 138 + parent: 139 +- id: 134 kind: RqOperator span: 1:81-88 targets: - - 136 -- id: 136 + - 137 +- id: 137 kind: Ident span: 1:70-78 ident: !Ident @@ -109,33 +109,33 @@ nodes: - tracks - album_id targets: - - 123 -- id: 137 + - 124 +- id: 138 kind: Literal span: 1:92-94 -- id: 138 +- id: 139 kind: Tuple span: 1:46-97 children: - - 130 - 131 - parent: 139 -- id: 139 + - 132 + parent: 140 +- id: 140 kind: 'TransformCall: Select' span: 1:39-97 children: - - 129 - - 138 - parent: 141 -- id: 141 + - 130 + - 139 + parent: 142 +- id: 142 kind: 'TransformCall: Take' span: 1:98-105 children: - - 139 - - 142 -- id: 142 + - 140 + - 143 +- id: 143 kind: Literal - parent: 141 + parent: 142 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__constants_only.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__constants_only.snap index 75b397a92c90..29b0129956ed 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__constants_only.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__constants_only.snap @@ -7,10 +7,10 @@ frames: - - 1:12-19 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: genres table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:20-31 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: genres table: - default_db @@ -29,10 +29,10 @@ frames: - - 1:32-39 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: genres table: - default_db @@ -40,10 +40,10 @@ frames: - - 1:40-51 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: genres table: - default_db @@ -53,81 +53,81 @@ frames: - !Single name: - d - target_id: 141 + target_id: 142 target_name: null inputs: - - id: 129 + - id: 130 name: genres table: - default_db - genres nodes: -- id: 129 +- id: 130 kind: Ident span: 1:0-11 ident: !Ident - default_db - genres - parent: 132 -- id: 132 + parent: 133 +- id: 133 kind: 'TransformCall: Take' span: 1:12-19 children: - - 129 - - 133 - parent: 135 -- id: 133 - kind: Literal - parent: 132 + - 130 + - 134 + parent: 136 - id: 134 kind: Literal - span: 1:27-31 - parent: 135 + parent: 133 - id: 135 + kind: Literal + span: 1:27-31 + parent: 136 +- id: 136 kind: 'TransformCall: Filter' span: 1:20-31 children: - - 132 - - 134 - parent: 137 -- id: 137 + - 133 + - 135 + parent: 138 +- id: 138 kind: 'TransformCall: Take' span: 1:32-39 children: - - 135 - - 138 - parent: 140 -- id: 138 - kind: Literal - parent: 137 + - 136 + - 139 + parent: 141 - id: 139 kind: Literal - span: 1:47-51 - parent: 140 + parent: 138 - id: 140 + kind: Literal + span: 1:47-51 + parent: 141 +- id: 141 kind: 'TransformCall: Filter' span: 1:40-51 children: - - 137 - - 139 - parent: 143 -- id: 141 + - 138 + - 140 + parent: 144 +- id: 142 kind: Literal span: 1:63-65 alias: d - parent: 142 -- id: 142 + parent: 143 +- id: 143 kind: Tuple span: 1:63-65 children: - - 141 - parent: 143 -- id: 143 + - 142 + parent: 144 +- id: 144 kind: 'TransformCall: Select' span: 1:52-65 children: - - 140 - - 142 + - 141 + - 143 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__date_to_text.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__date_to_text.snap index ca76bc8cee82..108921396c32 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__date_to_text.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__date_to_text.snap @@ -7,10 +7,10 @@ frames: - - 1:71-78 - columns: - !All - input_id: 120 + input_id: 121 except: [] inputs: - - id: 120 + - id: 121 name: invoices table: - default_db @@ -20,99 +20,99 @@ frames: - !Single name: - d1 - target_id: 125 + target_id: 126 target_name: null - !Single name: - d2 - target_id: 130 + target_id: 131 target_name: null - !Single name: - d3 - target_id: 135 + target_id: 136 target_name: null - !Single name: - d4 - target_id: 140 + target_id: 141 target_name: null - !Single name: - d5 - target_id: 145 + target_id: 146 target_name: null - !Single name: - d6 - target_id: 150 + target_id: 151 target_name: null - !Single name: - d7 - target_id: 155 + target_id: 156 target_name: null - !Single name: - d8 - target_id: 160 + target_id: 161 target_name: null - !Single name: - d9 - target_id: 165 + target_id: 166 target_name: null - !Single name: - d10 - target_id: 170 + target_id: 171 target_name: null - !Single name: - d11 - target_id: 175 + target_id: 176 target_name: null - !Single name: - d12 - target_id: 180 + target_id: 181 target_name: null inputs: - - id: 120 + - id: 121 name: invoices table: - default_db - invoices nodes: -- id: 120 +- id: 121 kind: Ident span: 1:57-70 ident: !Ident - default_db - invoices - parent: 123 -- id: 123 + parent: 124 +- id: 124 kind: 'TransformCall: Take' span: 1:71-78 children: - - 120 - - 124 - parent: 186 -- id: 124 - kind: Literal - parent: 123 + - 121 + - 125 + parent: 187 - id: 125 + kind: Literal + parent: 124 +- id: 126 kind: RqOperator span: 1:113-136 alias: d1 targets: - - 128 - 129 - parent: 185 -- id: 128 + - 130 + parent: 186 +- id: 129 kind: Literal span: 1:126-136 -- id: 129 +- id: 130 kind: Ident span: 1:98-110 ident: !Ident @@ -120,19 +120,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 130 + - 121 +- id: 131 kind: RqOperator span: 1:164-181 alias: d2 targets: - - 133 - 134 - parent: 185 -- id: 133 + - 135 + parent: 186 +- id: 134 kind: Literal span: 1:177-181 -- id: 134 +- id: 135 kind: Ident span: 1:149-161 ident: !Ident @@ -140,19 +140,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 135 + - 121 +- id: 136 kind: RqOperator span: 1:209-226 alias: d3 targets: - - 138 - 139 - parent: 185 -- id: 138 + - 140 + parent: 186 +- id: 139 kind: Literal span: 1:222-226 -- id: 139 +- id: 140 kind: Ident span: 1:194-206 ident: !Ident @@ -160,19 +160,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 140 + - 121 +- id: 141 kind: RqOperator span: 1:254-280 alias: d4 targets: - - 143 - 144 - parent: 185 -- id: 143 + - 145 + parent: 186 +- id: 144 kind: Literal span: 1:267-280 -- id: 144 +- id: 145 kind: Ident span: 1:239-251 ident: !Ident @@ -180,19 +180,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 145 + - 121 +- id: 146 kind: RqOperator span: 1:308-325 alias: d5 targets: - - 148 - 149 - parent: 185 -- id: 148 + - 150 + parent: 186 +- id: 149 kind: Literal span: 1:321-325 -- id: 149 +- id: 150 kind: Ident span: 1:293-305 ident: !Ident @@ -200,19 +200,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 150 + - 121 +- id: 151 kind: RqOperator span: 1:353-380 alias: d6 targets: - - 153 - 154 - parent: 185 -- id: 153 + - 155 + parent: 186 +- id: 154 kind: Literal span: 1:366-380 -- id: 154 +- id: 155 kind: Ident span: 1:338-350 ident: !Ident @@ -220,19 +220,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 155 + - 121 +- id: 156 kind: RqOperator span: 1:408-451 alias: d7 targets: - - 158 - 159 - parent: 185 -- id: 158 + - 160 + parent: 186 +- id: 159 kind: Literal span: 1:421-451 -- id: 159 +- id: 160 kind: Ident span: 1:393-405 ident: !Ident @@ -240,19 +240,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 160 + - 121 +- id: 161 kind: RqOperator span: 1:479-496 alias: d8 targets: - - 163 - 164 - parent: 185 -- id: 163 + - 165 + parent: 186 +- id: 164 kind: Literal span: 1:492-496 -- id: 164 +- id: 165 kind: Ident span: 1:464-476 ident: !Ident @@ -260,19 +260,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 165 + - 121 +- id: 166 kind: RqOperator span: 1:524-549 alias: d9 targets: - - 168 - 169 - parent: 185 -- id: 168 + - 170 + parent: 186 +- id: 169 kind: Literal span: 1:537-549 -- id: 169 +- id: 170 kind: Ident span: 1:509-521 ident: !Ident @@ -280,19 +280,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 170 + - 121 +- id: 171 kind: RqOperator span: 1:578-603 alias: d10 targets: - - 173 - 174 - parent: 185 -- id: 173 + - 175 + parent: 186 +- id: 174 kind: Literal span: 1:591-603 -- id: 174 +- id: 175 kind: Ident span: 1:563-575 ident: !Ident @@ -300,19 +300,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 175 + - 121 +- id: 176 kind: RqOperator span: 1:632-654 alias: d11 targets: - - 178 - 179 - parent: 185 -- id: 178 + - 180 + parent: 186 +- id: 179 kind: Literal span: 1:645-654 -- id: 179 +- id: 180 kind: Ident span: 1:617-629 ident: !Ident @@ -320,19 +320,19 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 180 + - 121 +- id: 181 kind: RqOperator span: 1:683-714 alias: d12 targets: - - 183 - 184 - parent: 185 -- id: 183 + - 185 + parent: 186 +- id: 184 kind: Literal span: 1:696-714 -- id: 184 +- id: 185 kind: Ident span: 1:668-680 ident: !Ident @@ -340,30 +340,30 @@ nodes: - invoices - invoice_date targets: - - 120 -- id: 185 + - 121 +- id: 186 kind: Tuple span: 1:86-718 children: - - 125 - - 130 - - 135 - - 140 - - 145 - - 150 - - 155 - - 160 - - 165 - - 170 - - 175 - - 180 - parent: 186 -- id: 186 + - 126 + - 131 + - 136 + - 141 + - 146 + - 151 + - 156 + - 161 + - 166 + - 171 + - 176 + - 181 + parent: 187 +- id: 187 kind: 'TransformCall: Select' span: 1:79-718 children: - - 123 - - 185 + - 124 + - 186 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct.snap index 22a75189f0ab..795c7558fc02 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct.snap @@ -10,16 +10,16 @@ frames: name: - tracks - album_id - target_id: 125 + target_id: 126 target_name: null - !Single name: - tracks - genre_id - target_id: 126 + target_id: 127 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -30,16 +30,16 @@ frames: name: - tracks - album_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - tracks - genre_id - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -50,29 +50,29 @@ frames: name: - tracks - album_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - tracks - genre_id - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 128 -- id: 125 + parent: 129 +- id: 126 kind: Ident span: 1:33-41 ident: !Ident @@ -80,9 +80,9 @@ nodes: - tracks - album_id targets: - - 123 - parent: 127 -- id: 126 + - 124 + parent: 128 +- id: 127 kind: Ident span: 1:43-51 ident: !Ident @@ -90,81 +90,81 @@ nodes: - tracks - genre_id targets: - - 123 - parent: 127 -- id: 127 + - 124 + parent: 128 +- id: 128 kind: Tuple span: 1:32-52 children: - - 125 - 126 - parent: 128 -- id: 128 + - 127 + parent: 129 +- id: 129 kind: 'TransformCall: Select' span: 1:25-52 children: - - 123 - - 127 - parent: 149 -- id: 130 + - 124 + - 128 + parent: 150 +- id: 131 kind: Ident ident: !Ident - this - tracks - album_id targets: - - 125 - parent: 132 -- id: 131 + - 126 + parent: 133 +- id: 132 kind: Ident ident: !Ident - this - tracks - genre_id targets: - - 126 - parent: 132 -- id: 132 + - 127 + parent: 133 +- id: 133 kind: Tuple span: 1:59-67 children: - - 130 - 131 -- id: 149 + - 132 +- id: 150 kind: 'TransformCall: Take' span: 1:69-75 children: - - 128 - - 150 - parent: 157 -- id: 150 + - 129 + - 151 + parent: 158 +- id: 151 kind: Literal - parent: 149 -- id: 154 + parent: 150 +- id: 155 kind: Ident ident: !Ident - this - tracks - album_id targets: - - 130 - parent: 157 -- id: 155 + - 131 + parent: 158 +- id: 156 kind: Ident ident: !Ident - this - tracks - genre_id targets: - - 131 - parent: 157 -- id: 157 + - 132 + parent: 158 +- id: 158 kind: 'TransformCall: Sort' span: 1:77-90 children: - - 149 - - 154 + - 150 - 155 + - 156 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct_on.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct_on.snap index 831a31453db4..4d76751e4542 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct_on.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__distinct_on.snap @@ -10,22 +10,22 @@ frames: name: - tracks - genre_id - target_id: 125 + target_id: 126 target_name: null - !Single name: - tracks - media_type_id - target_id: 126 + target_id: 127 target_name: null - !Single name: - tracks - album_id - target_id: 127 + target_id: 128 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -36,22 +36,22 @@ frames: name: - tracks - genre_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - tracks - media_type_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - tracks - album_id - target_id: 127 + target_id: 128 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -62,35 +62,35 @@ frames: name: - tracks - genre_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - tracks - media_type_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - tracks - album_id - target_id: 127 + target_id: 128 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 129 -- id: 125 + parent: 130 +- id: 126 kind: Ident span: 1:33-41 ident: !Ident @@ -98,9 +98,9 @@ nodes: - tracks - genre_id targets: - - 123 - parent: 128 -- id: 126 + - 124 + parent: 129 +- id: 127 kind: Ident span: 1:43-56 ident: !Ident @@ -108,9 +108,9 @@ nodes: - tracks - media_type_id targets: - - 123 - parent: 128 -- id: 127 + - 124 + parent: 129 +- id: 128 kind: Ident span: 1:58-66 ident: !Ident @@ -118,24 +118,24 @@ nodes: - tracks - album_id targets: - - 123 - parent: 128 -- id: 128 + - 124 + parent: 129 +- id: 129 kind: Tuple span: 1:32-67 children: - - 125 - 126 - 127 - parent: 129 -- id: 129 + - 128 + parent: 130 +- id: 130 kind: 'TransformCall: Select' span: 1:25-67 children: - - 123 - - 128 - parent: 161 -- id: 130 + - 124 + - 129 + parent: 162 +- id: 131 kind: Ident span: 1:75-83 ident: !Ident @@ -143,9 +143,9 @@ nodes: - tracks - genre_id targets: - - 125 - parent: 132 -- id: 131 + - 126 + parent: 133 +- id: 132 kind: Ident span: 1:85-98 ident: !Ident @@ -153,15 +153,15 @@ nodes: - tracks - media_type_id targets: - - 126 - parent: 132 -- id: 132 + - 127 + parent: 133 +- id: 133 kind: Tuple span: 1:74-99 children: - - 130 - 131 -- id: 157 + - 132 +- id: 158 kind: Ident span: 1:108-116 ident: !Ident @@ -169,18 +169,18 @@ nodes: - tracks - album_id targets: - - 127 -- id: 161 + - 128 +- id: 162 kind: 'TransformCall: Take' span: 1:120-126 children: - - 129 - - 162 - parent: 170 -- id: 162 + - 130 + - 163 + parent: 171 +- id: 163 kind: Literal - parent: 161 -- id: 167 + parent: 162 +- id: 168 kind: Ident span: 1:135-143 ident: !Ident @@ -188,9 +188,9 @@ nodes: - tracks - genre_id targets: - - 130 - parent: 170 -- id: 168 + - 131 + parent: 171 +- id: 169 kind: Ident span: 1:145-158 ident: !Ident @@ -198,15 +198,15 @@ nodes: - tracks - media_type_id targets: - - 131 - parent: 170 -- id: 170 + - 132 + parent: 171 +- id: 171 kind: 'TransformCall: Sort' span: 1:128-159 children: - - 161 - - 167 + - 162 - 168 + - 169 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__genre_counts.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__genre_counts.snap index 844a971eeec8..573296b35ce0 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__genre_counts.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__genre_counts.snap @@ -10,10 +10,10 @@ frames: name: - genre_count - a - target_id: 135 + target_id: 136 target_name: a inputs: - - id: 135 + - id: 136 name: genre_count table: - default_db @@ -23,29 +23,29 @@ frames: - !Single name: - a - target_id: 142 + target_id: 143 target_name: null inputs: - - id: 135 + - id: 136 name: genre_count table: - default_db - genres nodes: -- id: 135 +- id: 136 kind: Ident span: 1:187-203 ident: !Ident - genre_count - parent: 141 -- id: 137 + parent: 142 +- id: 138 kind: RqOperator span: 1:211-216 targets: - - 139 - 140 - parent: 141 -- id: 139 + - 141 + parent: 142 +- id: 140 kind: Ident span: 1:211-212 ident: !Ident @@ -53,25 +53,25 @@ nodes: - genre_count - a targets: - - 135 -- id: 140 + - 136 +- id: 141 kind: Literal span: 1:215-216 -- id: 141 +- id: 142 kind: 'TransformCall: Filter' span: 1:204-216 children: - - 135 - - 137 - parent: 146 -- id: 142 + - 136 + - 138 + parent: 147 +- id: 143 kind: RqOperator span: 1:228-230 alias: a targets: - - 144 - parent: 145 -- id: 144 + - 145 + parent: 146 +- id: 145 kind: Ident span: 1:229-230 ident: !Ident @@ -79,19 +79,19 @@ nodes: - genre_count - a targets: - - 135 -- id: 145 + - 136 +- id: 146 kind: Tuple span: 1:228-230 children: - - 142 - parent: 146 -- id: 146 + - 143 + parent: 147 +- id: 147 kind: 'TransformCall: Select' span: 1:217-230 children: - - 141 - - 145 + - 142 + - 146 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_all.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_all.snap index ce87803d483d..3f2cf5e44e75 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_all.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_all.snap @@ -7,10 +7,10 @@ frames: - - 1:27-34 - columns: - !All - input_id: 127 + input_id: 128 except: [] inputs: - - id: 127 + - id: 128 name: a table: - default_db @@ -18,18 +18,18 @@ frames: - - 1:35-59 - columns: - !All - input_id: 127 + input_id: 128 except: [] - !All - input_id: 121 + input_id: 122 except: [] inputs: - - id: 127 + - id: 128 name: a table: - default_db - albums - - id: 121 + - id: 122 name: tracks table: - default_db @@ -40,26 +40,26 @@ frames: name: - a - album_id - target_id: 137 + target_id: 138 target_name: null - !Single name: - a - title - target_id: 138 + target_id: 139 target_name: null - !Single name: - price - target_id: 156 + target_id: 157 target_name: null inputs: - - id: 127 + - id: 128 name: a table: - default_db - albums - - id: 121 + - id: 122 name: tracks table: - default_db @@ -70,63 +70,63 @@ frames: name: - a - album_id - target_id: 137 + target_id: 138 target_name: null - !Single name: - a - title - target_id: 138 + target_id: 139 target_name: null - !Single name: - price - target_id: 156 + target_id: 157 target_name: null inputs: - - id: 127 + - id: 128 name: a table: - default_db - albums - - id: 121 + - id: 122 name: tracks table: - default_db - tracks nodes: -- id: 121 +- id: 122 kind: Ident span: 1:40-46 ident: !Ident - default_db - tracks - parent: 136 -- id: 127 + parent: 137 +- id: 128 kind: Ident span: 1:13-26 ident: !Ident - default_db - albums - parent: 130 -- id: 130 + parent: 131 +- id: 131 kind: 'TransformCall: Take' span: 1:27-34 children: - - 127 - - 131 - parent: 136 -- id: 131 - kind: Literal - parent: 130 + - 128 + - 132 + parent: 137 - id: 132 + kind: Literal + parent: 131 +- id: 133 kind: RqOperator span: 1:48-58 targets: - - 134 - 135 - parent: 136 -- id: 134 + - 136 + parent: 137 +- id: 135 kind: Ident span: 1:50-58 ident: !Ident @@ -134,8 +134,8 @@ nodes: - a - album_id targets: - - 127 -- id: 135 + - 128 +- id: 136 kind: Ident span: 1:50-58 ident: !Ident @@ -143,16 +143,16 @@ nodes: - tracks - album_id targets: - - 121 -- id: 136 + - 122 +- id: 137 kind: 'TransformCall: Join' span: 1:35-59 children: - - 130 - - 121 - - 132 - parent: 164 -- id: 137 + - 131 + - 122 + - 133 + parent: 165 +- id: 138 kind: Ident span: 1:67-77 ident: !Ident @@ -160,9 +160,9 @@ nodes: - a - album_id targets: - - 127 - parent: 139 -- id: 138 + - 128 + parent: 140 +- id: 139 kind: Ident span: 1:79-86 ident: !Ident @@ -170,32 +170,32 @@ nodes: - a - title targets: - - 127 - parent: 139 -- id: 139 + - 128 + parent: 140 +- id: 140 kind: Tuple span: 1:66-87 children: - - 137 - 138 - parent: 164 -- id: 156 + - 139 + parent: 165 +- id: 157 kind: RqOperator span: 1:132-144 alias: price targets: - - 159 - 160 - parent: 163 -- id: 159 + - 161 + parent: 164 +- id: 160 kind: Literal span: 1:143-144 -- id: 160 +- id: 161 kind: RqOperator span: 1:108-129 targets: - - 162 -- id: 162 + - 163 +- id: 163 kind: Ident span: 1:112-129 ident: !Ident @@ -203,22 +203,22 @@ nodes: - tracks - unit_price targets: - - 121 -- id: 163 + - 122 +- id: 164 kind: Tuple span: 1:132-144 children: - - 156 - parent: 164 -- id: 164 + - 157 + parent: 165 +- id: 165 kind: 'TransformCall: Aggregate' span: 1:89-145 children: - - 136 - - 163 - - 139 - parent: 169 -- id: 167 + - 137 + - 164 + - 140 + parent: 170 +- id: 168 kind: Ident span: 1:152-160 ident: !Ident @@ -226,14 +226,14 @@ nodes: - a - album_id targets: - - 137 - parent: 169 -- id: 169 + - 138 + parent: 170 +- id: 170 kind: 'TransformCall: Sort' span: 1:147-160 children: - - 164 - - 167 + - 165 + - 168 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort.snap index 0b042bede5e0..36318b3b7d14 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort.snap @@ -7,15 +7,15 @@ frames: - - 1:25-48 - columns: - !All - input_id: 129 + input_id: 130 except: [] - !Single name: - d - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -25,15 +25,15 @@ frames: - !Single name: - d - target_id: 137 + target_id: 138 target_name: null - !Single name: - n1 - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -43,15 +43,15 @@ frames: - !Single name: - d - target_id: 137 + target_id: 138 target_name: null - !Single name: - n1 - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -61,15 +61,15 @@ frames: - !Single name: - d - target_id: 137 + target_id: 138 target_name: null - !Single name: - n1 - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -79,36 +79,36 @@ frames: - !Single name: - d1 - target_id: 167 + target_id: 168 target_name: null - !Single name: - n1 - target_id: 168 + target_id: 169 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db - tracks nodes: -- id: 129 +- id: 130 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 136 -- id: 131 + parent: 137 +- id: 132 kind: RqOperator span: 1:36-48 alias: d targets: - - 133 - 134 - parent: 135 -- id: 133 + - 135 + parent: 136 +- id: 134 kind: Ident span: 1:36-44 ident: !Ident @@ -116,46 +116,46 @@ nodes: - tracks - album_id targets: - - 129 -- id: 134 + - 130 +- id: 135 kind: Literal span: 1:47-48 -- id: 135 +- id: 136 kind: Tuple span: 1:36-48 children: - - 131 - parent: 136 -- id: 136 + - 132 + parent: 137 +- id: 137 kind: 'TransformCall: Derive' span: 1:25-48 children: - - 129 - - 135 - parent: 158 -- id: 137 + - 130 + - 136 + parent: 159 +- id: 138 kind: Ident span: 1:55-56 ident: !Ident - this - d targets: - - 131 - parent: 140 -- id: 140 + - 132 + parent: 141 +- id: 141 kind: Tuple span: 1:55-56 children: - - 137 - parent: 158 -- id: 154 + - 138 + parent: 159 +- id: 155 kind: RqOperator span: 1:100-103 alias: n1 targets: - - 156 - parent: 157 -- id: 156 + - 157 + parent: 158 +- id: 157 kind: Ident span: 1:89-97 ident: !Ident @@ -163,48 +163,48 @@ nodes: - tracks - track_id targets: - - 129 -- id: 157 + - 130 +- id: 158 kind: Tuple span: 1:73-111 children: - - 154 - parent: 158 -- id: 158 + - 155 + parent: 159 +- id: 159 kind: 'TransformCall: Aggregate' span: 1:63-111 children: - - 136 - - 157 - - 140 - parent: 163 -- id: 161 + - 137 + - 158 + - 141 + parent: 164 +- id: 162 kind: Ident span: 1:119-120 ident: !Ident - this - d targets: - - 137 - parent: 163 -- id: 163 + - 138 + parent: 164 +- id: 164 kind: 'TransformCall: Sort' span: 1:114-120 children: - - 158 - - 161 - parent: 165 -- id: 165 + - 159 + - 162 + parent: 166 +- id: 166 kind: 'TransformCall: Take' span: 1:121-128 children: - - 163 - - 166 - parent: 170 -- id: 166 - kind: Literal - parent: 165 + - 164 + - 167 + parent: 171 - id: 167 + kind: Literal + parent: 166 +- id: 168 kind: Ident span: 1:143-144 alias: d1 @@ -212,30 +212,30 @@ nodes: - this - d targets: - - 137 - parent: 169 -- id: 168 + - 138 + parent: 170 +- id: 169 kind: Ident span: 1:146-148 ident: !Ident - this - n1 targets: - - 154 - parent: 169 -- id: 169 + - 155 + parent: 170 +- id: 170 kind: Tuple span: 1:136-150 children: - - 167 - 168 - parent: 170 -- id: 170 + - 169 + parent: 171 +- id: 171 kind: 'TransformCall: Select' span: 1:129-150 children: - - 165 - - 169 + - 166 + - 170 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_derive_select_join.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_derive_select_join.snap index 410be173d8a1..3481618172d5 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_derive_select_join.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_derive_select_join.snap @@ -8,186 +8,186 @@ frames: - columns: - !Single name: - - _literal_128 + - _literal_129 - artist_id - target_id: 129 + target_id: 130 target_name: null - !Single name: - album_title_count - target_id: 148 + target_id: 149 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:119-164 - columns: - !Single name: - - _literal_128 + - _literal_129 - artist_id - target_id: 129 + target_id: 130 target_name: null - !Single name: - album_title_count - target_id: 148 + target_id: 149 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:165-214 - columns: - !Single name: - - _literal_128 + - _literal_129 - artist_id - target_id: 129 + target_id: 130 target_name: null - !Single name: - album_title_count - target_id: 148 + target_id: 149 target_name: null - !Single name: - new_album_count - target_id: 158 + target_id: 159 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:215-260 - columns: - !Single name: - - _literal_128 + - _literal_129 - artist_id - target_id: 161 + target_id: 162 target_name: null - !Single name: - new_album_count - target_id: 162 + target_id: 163 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:261-367 - columns: - !Single name: - - _literal_128 + - _literal_129 - artist_id - target_id: 161 + target_id: 162 target_name: null - !Single name: - new_album_count - target_id: 162 + target_id: 163 target_name: null - !All - input_id: 115 + input_id: 116 except: [] inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 - - id: 115 - name: _literal_115 + - _literal_129 + - id: 116 + name: _literal_116 table: - default_db - - _literal_115 + - _literal_116 nodes: -- id: 115 +- id: 116 kind: SString span: 1:278-330 - parent: 169 -- id: 128 + parent: 170 +- id: 129 kind: SString span: 1:0-46 - parent: 151 -- id: 129 + parent: 152 +- id: 130 kind: Ident span: 1:54-63 ident: !Ident - this - - _literal_128 + - _literal_129 - artist_id targets: - - 128 - parent: 130 -- id: 130 + - 129 + parent: 131 +- id: 131 kind: Tuple span: 1:53-64 children: - - 129 - parent: 151 -- id: 148 + - 130 + parent: 152 +- id: 149 kind: RqOperator span: 1:98-116 alias: album_title_count targets: - - 149 - parent: 150 -- id: 149 - kind: Literal + - 150 + parent: 151 - id: 150 + kind: Literal +- id: 151 kind: Tuple span: 1:76-117 children: - - 148 - parent: 151 -- id: 151 + - 149 + parent: 152 +- id: 152 kind: 'TransformCall: Aggregate' span: 1:66-117 children: - - 128 - - 150 - - 130 - parent: 157 -- id: 154 + - 129 + - 151 + - 131 + parent: 158 +- id: 155 kind: Ident span: 1:125-139 ident: !Ident - this - - _literal_128 + - _literal_129 - artist_id targets: - - 129 - parent: 157 -- id: 155 + - 130 + parent: 158 +- id: 156 kind: Ident span: 1:141-163 ident: !Ident - this - album_title_count targets: - - 148 - parent: 157 -- id: 157 + - 149 + parent: 158 +- id: 158 kind: 'TransformCall: Sort' span: 1:119-164 children: - - 151 - - 154 + - 152 - 155 - parent: 160 -- id: 158 + - 156 + parent: 161 +- id: 159 kind: Ident span: 1:191-213 alias: new_album_count @@ -195,86 +195,86 @@ nodes: - this - album_title_count targets: - - 148 - parent: 159 -- id: 159 + - 149 + parent: 160 +- id: 160 kind: Tuple span: 1:172-214 children: - - 158 - parent: 160 -- id: 160 + - 159 + parent: 161 +- id: 161 kind: 'TransformCall: Derive' span: 1:165-214 children: - - 157 - - 159 - parent: 164 -- id: 161 + - 158 + - 160 + parent: 165 +- id: 162 kind: Ident span: 1:223-237 ident: !Ident - this - - _literal_128 + - _literal_129 - artist_id targets: - - 129 - parent: 163 -- id: 162 + - 130 + parent: 164 +- id: 163 kind: Ident span: 1:239-259 ident: !Ident - this - new_album_count targets: - - 158 - parent: 163 -- id: 163 + - 159 + parent: 164 +- id: 164 kind: Tuple span: 1:222-260 children: - - 161 - 162 - parent: 164 -- id: 164 + - 163 + parent: 165 +- id: 165 kind: 'TransformCall: Select' span: 1:215-260 children: - - 160 - - 163 - parent: 169 -- id: 165 + - 161 + - 164 + parent: 170 +- id: 166 kind: RqOperator span: 1:334-366 targets: - - 167 - 168 - parent: 169 -- id: 167 + - 169 + parent: 170 +- id: 168 kind: Ident span: 1:334-348 ident: !Ident - this - - _literal_128 + - _literal_129 - artist_id targets: - - 161 -- id: 168 + - 162 +- id: 169 kind: Ident span: 1:352-366 ident: !Ident - that - - _literal_115 + - _literal_116 - artist_id targets: - - 115 -- id: 169 + - 116 +- id: 170 kind: 'TransformCall: Join' span: 1:261-367 children: - - 164 - - 115 - 165 + - 116 + - 166 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_filter_derive_select_join.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_filter_derive_select_join.snap index cb98d9b19dee..355d52efdba6 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_filter_derive_select_join.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_filter_derive_select_join.snap @@ -8,230 +8,230 @@ frames: - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - album_title_count - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:119-164 - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - album_title_count - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:165-201 - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - album_title_count - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:202-251 - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - album_title_count - target_id: 151 + target_id: 152 target_name: null - !Single name: - new_album_count - target_id: 166 + target_id: 167 target_name: null inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:252-297 - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - new_album_count - target_id: 170 + target_id: 171 target_name: null inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:298-404 - columns: - !Single name: - - _literal_131 + - _literal_132 - artist_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - new_album_count - target_id: 170 + target_id: 171 target_name: null - !All - input_id: 115 + input_id: 116 except: [] inputs: - - id: 131 - name: _literal_131 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 - - id: 115 - name: _literal_115 + - _literal_132 + - id: 116 + name: _literal_116 table: - default_db - - _literal_115 + - _literal_116 nodes: -- id: 115 +- id: 116 kind: SString span: 1:315-367 - parent: 177 -- id: 131 + parent: 178 +- id: 132 kind: SString span: 1:0-46 - parent: 154 -- id: 132 + parent: 155 +- id: 133 kind: Ident span: 1:54-63 ident: !Ident - this - - _literal_131 + - _literal_132 - artist_id targets: - - 131 - parent: 133 -- id: 133 + - 132 + parent: 134 +- id: 134 kind: Tuple span: 1:53-64 children: - - 132 - parent: 154 -- id: 151 + - 133 + parent: 155 +- id: 152 kind: RqOperator span: 1:98-116 alias: album_title_count targets: - - 152 - parent: 153 -- id: 152 - kind: Literal + - 153 + parent: 154 - id: 153 + kind: Literal +- id: 154 kind: Tuple span: 1:76-117 children: - - 151 - parent: 154 -- id: 154 + - 152 + parent: 155 +- id: 155 kind: 'TransformCall: Aggregate' span: 1:66-117 children: - - 131 - - 153 - - 133 - parent: 160 -- id: 157 + - 132 + - 154 + - 134 + parent: 161 +- id: 158 kind: Ident span: 1:125-139 ident: !Ident - this - - _literal_131 + - _literal_132 - artist_id targets: - - 132 - parent: 160 -- id: 158 + - 133 + parent: 161 +- id: 159 kind: Ident span: 1:141-163 ident: !Ident - this - album_title_count targets: - - 151 - parent: 160 -- id: 160 + - 152 + parent: 161 +- id: 161 kind: 'TransformCall: Sort' span: 1:119-164 children: - - 154 - - 157 + - 155 - 158 - parent: 165 -- id: 161 + - 159 + parent: 166 +- id: 162 kind: RqOperator span: 1:172-201 targets: - - 163 - 164 - parent: 165 -- id: 163 + - 165 + parent: 166 +- id: 164 kind: Ident span: 1:173-195 ident: !Ident - this - album_title_count targets: - - 151 -- id: 164 + - 152 +- id: 165 kind: Literal span: 1:199-201 -- id: 165 +- id: 166 kind: 'TransformCall: Filter' span: 1:165-201 children: - - 160 - 161 - parent: 168 -- id: 166 + - 162 + parent: 169 +- id: 167 kind: Ident span: 1:228-250 alias: new_album_count @@ -239,86 +239,86 @@ nodes: - this - album_title_count targets: - - 151 - parent: 167 -- id: 167 + - 152 + parent: 168 +- id: 168 kind: Tuple span: 1:209-251 children: - - 166 - parent: 168 -- id: 168 + - 167 + parent: 169 +- id: 169 kind: 'TransformCall: Derive' span: 1:202-251 children: - - 165 - - 167 - parent: 172 -- id: 169 + - 166 + - 168 + parent: 173 +- id: 170 kind: Ident span: 1:260-274 ident: !Ident - this - - _literal_131 + - _literal_132 - artist_id targets: - - 132 - parent: 171 -- id: 170 + - 133 + parent: 172 +- id: 171 kind: Ident span: 1:276-296 ident: !Ident - this - new_album_count targets: - - 166 - parent: 171 -- id: 171 + - 167 + parent: 172 +- id: 172 kind: Tuple span: 1:259-297 children: - - 169 - 170 - parent: 172 -- id: 172 + - 171 + parent: 173 +- id: 173 kind: 'TransformCall: Select' span: 1:252-297 children: - - 168 - - 171 - parent: 177 -- id: 173 + - 169 + - 172 + parent: 178 +- id: 174 kind: RqOperator span: 1:371-403 targets: - - 175 - 176 - parent: 177 -- id: 175 + - 177 + parent: 178 +- id: 176 kind: Ident span: 1:371-385 ident: !Ident - this - - _literal_131 + - _literal_132 - artist_id targets: - - 169 -- id: 176 + - 170 +- id: 177 kind: Ident span: 1:389-403 ident: !Ident - that - - _literal_115 + - _literal_116 - artist_id targets: - - 115 -- id: 177 + - 116 +- id: 178 kind: 'TransformCall: Join' span: 1:298-404 children: - - 172 - - 115 - 173 + - 116 + - 174 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_limit_take.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_limit_take.snap index fb4de1e7b6a0..5214f60b559d 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_limit_take.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__group_sort_limit_take.snap @@ -10,16 +10,16 @@ frames: name: - tracks - genre_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - tracks - milliseconds - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 130 + - id: 131 name: tracks table: - default_db @@ -30,16 +30,16 @@ frames: name: - tracks - genre_id - target_id: 136 + target_id: 137 target_name: null - !Single name: - tracks - milliseconds - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 130 + - id: 131 name: tracks table: - default_db @@ -50,24 +50,24 @@ frames: name: - tracks - genre_id - target_id: 136 + target_id: 137 target_name: null - !Single name: - tracks - milliseconds - target_id: 133 + target_id: 134 target_name: null - !All - input_id: 121 + input_id: 122 except: [] inputs: - - id: 130 + - id: 131 name: tracks table: - default_db - tracks - - id: 121 + - id: 122 name: genres table: - default_db @@ -78,21 +78,21 @@ frames: name: - genres - name - target_id: 174 + target_id: 175 target_name: null - !Single name: - tracks - milliseconds - target_id: 175 + target_id: 176 target_name: null inputs: - - id: 130 + - id: 131 name: tracks table: - default_db - tracks - - id: 121 + - id: 122 name: genres table: - default_db @@ -103,41 +103,41 @@ frames: name: - genres - name - target_id: 174 + target_id: 175 target_name: null - !Single name: - tracks - milliseconds - target_id: 175 + target_id: 176 target_name: null inputs: - - id: 130 + - id: 131 name: tracks table: - default_db - tracks - - id: 121 + - id: 122 name: genres table: - default_db - genres nodes: -- id: 121 +- id: 122 kind: Ident span: 1:177-183 ident: !Ident - default_db - genres - parent: 173 -- id: 130 + parent: 174 +- id: 131 kind: Ident span: 1:76-87 ident: !Ident - default_db - tracks - parent: 135 -- id: 132 + parent: 136 +- id: 133 kind: Ident span: 1:96-104 ident: !Ident @@ -145,9 +145,9 @@ nodes: - tracks - genre_id targets: - - 130 - parent: 134 -- id: 133 + - 131 + parent: 135 +- id: 134 kind: Ident span: 1:105-117 ident: !Ident @@ -155,23 +155,23 @@ nodes: - tracks - milliseconds targets: - - 130 - parent: 134 -- id: 134 + - 131 + parent: 135 +- id: 135 kind: Tuple span: 1:95-118 children: - - 132 - 133 - parent: 135 -- id: 135 + - 134 + parent: 136 +- id: 136 kind: 'TransformCall: Select' span: 1:88-118 children: - - 130 - - 134 - parent: 165 -- id: 136 + - 131 + - 135 + parent: 166 +- id: 137 kind: Ident span: 1:126-134 ident: !Ident @@ -179,14 +179,14 @@ nodes: - tracks - genre_id targets: - - 132 - parent: 137 -- id: 137 + - 133 + parent: 138 +- id: 138 kind: Tuple span: 1:125-135 children: - - 136 -- id: 161 + - 137 +- id: 162 kind: Ident span: 1:147-159 ident: !Ident @@ -194,25 +194,25 @@ nodes: - tracks - milliseconds targets: - - 133 -- id: 165 + - 134 +- id: 166 kind: 'TransformCall: Take' span: 1:163-169 children: - - 135 - - 166 - parent: 173 -- id: 166 + - 136 + - 167 + parent: 174 +- id: 167 kind: Literal - parent: 165 -- id: 169 + parent: 166 +- id: 170 kind: RqOperator span: 1:185-195 targets: - - 171 - 172 - parent: 173 -- id: 171 + - 173 + parent: 174 +- id: 172 kind: Ident span: 1:187-195 ident: !Ident @@ -220,8 +220,8 @@ nodes: - tracks - genre_id targets: - - 136 -- id: 172 + - 137 +- id: 173 kind: Ident span: 1:187-195 ident: !Ident @@ -229,16 +229,16 @@ nodes: - genres - genre_id targets: - - 121 -- id: 173 + - 122 +- id: 174 kind: 'TransformCall: Join' span: 1:172-196 children: - - 165 - - 121 - - 169 - parent: 177 -- id: 174 + - 166 + - 122 + - 170 + parent: 178 +- id: 175 kind: Ident span: 1:205-209 ident: !Ident @@ -246,9 +246,9 @@ nodes: - genres - name targets: - - 121 - parent: 176 -- id: 175 + - 122 + parent: 177 +- id: 176 kind: Ident span: 1:211-223 ident: !Ident @@ -256,23 +256,23 @@ nodes: - tracks - milliseconds targets: - - 133 - parent: 176 -- id: 176 + - 134 + parent: 177 +- id: 177 kind: Tuple span: 1:204-224 children: - - 174 - 175 - parent: 177 -- id: 177 + - 176 + parent: 178 +- id: 178 kind: 'TransformCall: Select' span: 1:197-224 children: - - 173 - - 176 - parent: 183 -- id: 178 + - 174 + - 177 + parent: 184 +- id: 179 kind: Ident span: 1:231-236 ident: !Ident @@ -280,9 +280,9 @@ nodes: - genres - name targets: - - 174 - parent: 183 -- id: 181 + - 175 + parent: 184 +- id: 182 kind: Ident span: 1:238-250 ident: !Ident @@ -290,15 +290,15 @@ nodes: - tracks - milliseconds targets: - - 175 - parent: 183 -- id: 183 + - 176 + parent: 184 +- id: 184 kind: 'TransformCall: Sort' span: 1:225-251 children: - - 177 - 178 - - 181 + - 179 + - 182 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__invoice_totals.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__invoice_totals.snap index cebeda842874..ee23a13653bf 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__invoice_totals.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__invoice_totals.snap @@ -7,18 +7,18 @@ frames: - - 1:147-183 - columns: - !All - input_id: 139 + input_id: 140 except: [] - !All - input_id: 136 + input_id: 137 except: [] inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -26,28 +26,28 @@ frames: - - 1:184-253 - columns: - !All - input_id: 139 + input_id: 140 except: [] - !All - input_id: 136 + input_id: 137 except: [] - !Single name: - city - target_id: 146 + target_id: 147 target_name: null - !Single name: - street - target_id: 147 + target_id: 148 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -55,23 +55,23 @@ frames: - - 1:281-323 - columns: - !All - input_id: 139 + input_id: 140 except: [] - !All - input_id: 136 + input_id: 137 except: [] - !Single name: - total - target_id: 177 + target_id: 178 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -81,35 +81,35 @@ frames: - !Single name: - city - target_id: 150 + target_id: 151 target_name: null - !Single name: - street - target_id: 151 + target_id: 152 target_name: null - !Single name: - num_orders - target_id: 183 + target_id: 184 target_name: null - !Single name: - num_tracks - target_id: 186 + target_id: 187 target_name: null - !Single name: - total_price - target_id: 189 + target_id: 190 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -119,40 +119,40 @@ frames: - !Single name: - city - target_id: 196 + target_id: 197 target_name: null - !Single name: - street - target_id: 151 + target_id: 152 target_name: null - !Single name: - num_orders - target_id: 183 + target_id: 184 target_name: null - !Single name: - num_tracks - target_id: 186 + target_id: 187 target_name: null - !Single name: - total_price - target_id: 189 + target_id: 190 target_name: null - !Single name: - running_total_num_tracks - target_id: 242 + target_id: 243 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -162,40 +162,40 @@ frames: - !Single name: - city - target_id: 196 + target_id: 197 target_name: null - !Single name: - street - target_id: 151 + target_id: 152 target_name: null - !Single name: - num_orders - target_id: 183 + target_id: 184 target_name: null - !Single name: - num_tracks - target_id: 186 + target_id: 187 target_name: null - !Single name: - total_price - target_id: 189 + target_id: 190 target_name: null - !Single name: - running_total_num_tracks - target_id: 242 + target_id: 243 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -205,45 +205,45 @@ frames: - !Single name: - city - target_id: 196 + target_id: 197 target_name: null - !Single name: - street - target_id: 151 + target_id: 152 target_name: null - !Single name: - num_orders - target_id: 183 + target_id: 184 target_name: null - !Single name: - num_tracks - target_id: 186 + target_id: 187 target_name: null - !Single name: - total_price - target_id: 189 + target_id: 190 target_name: null - !Single name: - running_total_num_tracks - target_id: 242 + target_id: 243 target_name: null - !Single name: - num_tracks_last_week - target_id: 256 + target_id: 257 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -253,40 +253,40 @@ frames: - !Single name: - city - target_id: 262 + target_id: 263 target_name: null - !Single name: - street - target_id: 263 + target_id: 264 target_name: null - !Single name: - num_orders - target_id: 264 + target_id: 265 target_name: null - !Single name: - num_tracks - target_id: 265 + target_id: 266 target_name: null - !Single name: - running_total_num_tracks - target_id: 266 + target_id: 267 target_name: null - !Single name: - num_tracks_last_week - target_id: 267 + target_id: 268 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db @@ -296,67 +296,67 @@ frames: - !Single name: - city - target_id: 262 + target_id: 263 target_name: null - !Single name: - street - target_id: 263 + target_id: 264 target_name: null - !Single name: - num_orders - target_id: 264 + target_id: 265 target_name: null - !Single name: - num_tracks - target_id: 265 + target_id: 266 target_name: null - !Single name: - running_total_num_tracks - target_id: 266 + target_id: 267 target_name: null - !Single name: - num_tracks_last_week - target_id: 267 + target_id: 268 target_name: null inputs: - - id: 139 + - id: 140 name: i table: - default_db - invoices - - id: 136 + - id: 137 name: ii table: - default_db - invoice_items nodes: -- id: 136 +- id: 137 kind: Ident span: 1:155-168 ident: !Ident - default_db - invoice_items - parent: 145 -- id: 139 + parent: 146 +- id: 140 kind: Ident span: 1:131-146 ident: !Ident - default_db - invoices - parent: 145 -- id: 141 + parent: 146 +- id: 142 kind: RqOperator span: 1:170-182 targets: - - 143 - 144 - parent: 145 -- id: 143 + - 145 + parent: 146 +- id: 144 kind: Ident span: 1:172-182 ident: !Ident @@ -364,8 +364,8 @@ nodes: - i - invoice_id targets: - - 139 -- id: 144 + - 140 +- id: 145 kind: Ident span: 1:172-182 ident: !Ident @@ -373,16 +373,16 @@ nodes: - ii - invoice_id targets: - - 136 -- id: 145 + - 137 +- id: 146 kind: 'TransformCall: Join' span: 1:147-183 children: - - 139 - - 136 - - 141 - parent: 149 -- id: 146 + - 140 + - 137 + - 142 + parent: 150 +- id: 147 kind: Ident span: 1:204-218 alias: city @@ -391,9 +391,9 @@ nodes: - i - billing_city targets: - - 139 - parent: 148 -- id: 147 + - 140 + parent: 149 +- id: 148 kind: Ident span: 1:233-250 alias: street @@ -402,56 +402,56 @@ nodes: - i - billing_address targets: - - 139 - parent: 148 -- id: 148 + - 140 + parent: 149 +- id: 149 kind: Tuple span: 1:191-253 children: - - 146 - 147 - parent: 149 -- id: 149 + - 148 + parent: 150 +- id: 150 kind: 'TransformCall: Derive' span: 1:184-253 children: - - 145 - - 148 - parent: 182 -- id: 150 + - 146 + - 149 + parent: 183 +- id: 151 kind: Ident span: 1:261-265 ident: !Ident - this - city targets: - - 146 - parent: 152 -- id: 151 + - 147 + parent: 153 +- id: 152 kind: Ident span: 1:267-273 ident: !Ident - this - street targets: - - 147 - parent: 152 -- id: 152 + - 148 + parent: 153 +- id: 153 kind: Tuple span: 1:260-274 children: - - 150 - 151 - parent: 193 -- id: 177 + - 152 + parent: 194 +- id: 178 kind: RqOperator span: 1:296-323 alias: total targets: - - 179 - 180 - parent: 181 -- id: 179 + - 181 + parent: 182 +- id: 180 kind: Ident span: 1:296-309 ident: !Ident @@ -459,8 +459,8 @@ nodes: - ii - unit_price targets: - - 136 -- id: 180 + - 137 +- id: 181 kind: Ident span: 1:312-323 ident: !Ident @@ -468,28 +468,28 @@ nodes: - ii - quantity targets: - - 136 -- id: 181 + - 137 +- id: 182 kind: Tuple span: 1:296-323 children: - - 177 - parent: 182 -- id: 182 + - 178 + parent: 183 +- id: 183 kind: 'TransformCall: Derive' span: 1:281-323 children: - - 149 - - 181 - parent: 193 -- id: 183 + - 150 + - 182 + parent: 194 +- id: 184 kind: RqOperator span: 1:361-388 alias: num_orders targets: - - 185 - parent: 192 -- id: 185 + - 186 + parent: 193 +- id: 186 kind: Ident span: 1:376-388 ident: !Ident @@ -497,15 +497,15 @@ nodes: - i - invoice_id targets: - - 139 -- id: 186 + - 140 +- id: 187 kind: RqOperator span: 1:411-426 alias: num_tracks targets: - - 188 - parent: 192 -- id: 188 + - 189 + parent: 193 +- id: 189 kind: Ident span: 1:415-426 ident: !Ident @@ -513,229 +513,229 @@ nodes: - ii - quantity targets: - - 136 -- id: 189 + - 137 +- id: 190 kind: RqOperator span: 1:450-459 alias: total_price targets: - - 191 - parent: 192 -- id: 191 + - 192 + parent: 193 +- id: 192 kind: Ident span: 1:454-459 ident: !Ident - this - total targets: - - 177 -- id: 192 + - 178 +- id: 193 kind: Tuple span: 1:338-466 children: - - 183 - - 186 - - 189 - parent: 193 -- id: 193 + - 184 + - 187 + - 190 + parent: 194 +- id: 194 kind: 'TransformCall: Aggregate' span: 1:328-466 children: - - 182 - - 192 - - 152 - parent: 246 -- id: 196 + - 183 + - 193 + - 153 + parent: 247 +- id: 197 kind: Ident span: 1:476-480 ident: !Ident - this - city targets: - - 150 - parent: 197 -- id: 197 + - 151 + parent: 198 +- id: 198 kind: Tuple span: 1:475-481 children: - - 196 -- id: 221 + - 197 +- id: 222 kind: Ident span: 1:493-499 ident: !Ident - this - street targets: - - 151 -- id: 242 + - 152 +- id: 243 kind: RqOperator span: 1:571-585 alias: running_total_num_tracks targets: - - 244 - parent: 245 -- id: 244 + - 245 + parent: 246 +- id: 245 kind: Ident span: 1:575-585 ident: !Ident - this - num_tracks targets: - - 186 -- id: 245 + - 187 +- id: 246 kind: Tuple span: 1:543-586 children: - - 242 - parent: 246 -- id: 246 + - 243 + parent: 247 +- id: 247 kind: 'TransformCall: Derive' span: 1:536-586 children: - - 193 - - 245 - parent: 255 -- id: 248 + - 194 + - 246 + parent: 256 +- id: 249 kind: Literal -- id: 252 +- id: 253 kind: Ident span: 1:601-605 ident: !Ident - this - city targets: - - 196 - parent: 255 -- id: 253 + - 197 + parent: 256 +- id: 254 kind: Ident span: 1:607-613 ident: !Ident - this - street targets: - - 151 - parent: 255 -- id: 255 + - 152 + parent: 256 +- id: 256 kind: 'TransformCall: Sort' span: 1:595-614 children: - - 246 - - 252 + - 247 - 253 - parent: 261 -- id: 256 + - 254 + parent: 262 +- id: 257 kind: RqOperator span: 1:646-662 alias: num_tracks_last_week targets: - - 258 - 259 - parent: 260 -- id: 258 + - 260 + parent: 261 +- id: 259 kind: Literal span: 1:650-651 -- id: 259 +- id: 260 kind: Ident span: 1:652-662 ident: !Ident - this - num_tracks targets: - - 186 -- id: 260 + - 187 +- id: 261 kind: Tuple span: 1:622-663 children: - - 256 - parent: 261 -- id: 261 + - 257 + parent: 262 +- id: 262 kind: 'TransformCall: Derive' span: 1:615-663 children: - - 255 - - 260 - parent: 269 -- id: 262 + - 256 + - 261 + parent: 270 +- id: 263 kind: Ident span: 1:677-681 ident: !Ident - this - city targets: - - 196 - parent: 268 -- id: 263 + - 197 + parent: 269 +- id: 264 kind: Ident span: 1:687-693 ident: !Ident - this - street targets: - - 151 - parent: 268 -- id: 264 + - 152 + parent: 269 +- id: 265 kind: Ident span: 1:699-709 ident: !Ident - this - num_orders targets: - - 183 - parent: 268 -- id: 265 + - 184 + parent: 269 +- id: 266 kind: Ident span: 1:715-725 ident: !Ident - this - num_tracks targets: - - 186 - parent: 268 -- id: 266 + - 187 + parent: 269 +- id: 267 kind: Ident span: 1:731-755 ident: !Ident - this - running_total_num_tracks targets: - - 242 - parent: 268 -- id: 267 + - 243 + parent: 269 +- id: 268 kind: Ident span: 1:761-781 ident: !Ident - this - num_tracks_last_week targets: - - 256 - parent: 268 -- id: 268 + - 257 + parent: 269 +- id: 269 kind: Tuple span: 1:671-783 children: - - 262 - 263 - 264 - 265 - 266 - 267 - parent: 269 -- id: 269 + - 268 + parent: 270 +- id: 270 kind: 'TransformCall: Select' span: 1:664-783 children: - - 261 - - 268 - parent: 271 -- id: 271 + - 262 + - 269 + parent: 272 +- id: 272 kind: 'TransformCall: Take' span: 1:784-791 children: - - 269 - - 272 -- id: 272 + - 270 + - 273 +- id: 273 kind: Literal - parent: 271 + parent: 272 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__loop_01.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__loop_01.snap index 3ed22ec8ff28..36fedb6b3dfd 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__loop_01.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__loop_01.snap @@ -9,252 +9,252 @@ frames: - !Single name: - n - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 - - 1:200-212 - columns: - !Single name: - n - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 - - 1:215-231 - columns: - !Single name: - n - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 - - 1:194-232 - columns: - !Single name: - n - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 - - 1:233-249 - columns: - !Single name: - n - target_id: 161 + target_id: 162 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 - - 1:250-256 - columns: - !Single name: - n - target_id: 161 + target_id: 162 target_name: null inputs: - - id: 126 - name: _literal_126 + - id: 127 + name: _literal_127 table: - default_db - - _literal_126 + - _literal_127 nodes: -- id: 126 +- id: 127 kind: Array span: 1:162-176 children: - - 127 - parent: 135 -- id: 127 + - 128 + parent: 136 +- id: 128 kind: Tuple span: 1:168-175 children: - - 128 - parent: 126 -- id: 128 + - 129 + parent: 127 +- id: 129 kind: Literal span: 1:173-174 alias: n - parent: 127 -- id: 130 + parent: 128 +- id: 131 kind: RqOperator span: 1:188-193 alias: n targets: - - 132 - 133 - parent: 134 -- id: 132 + - 134 + parent: 135 +- id: 133 kind: Ident span: 1:188-189 ident: !Ident - this - - _literal_126 + - _literal_127 - n targets: - - 126 -- id: 133 + - 127 +- id: 134 kind: Literal span: 1:192-193 -- id: 134 +- id: 135 kind: Tuple span: 1:188-193 children: - - 130 - parent: 135 -- id: 135 + - 131 + parent: 136 +- id: 136 kind: 'TransformCall: Select' span: 1:177-193 children: - - 126 - - 134 - parent: 159 -- id: 144 + - 127 + - 135 + parent: 160 +- id: 145 kind: Ident ident: !Ident - _param - _tbl targets: - - 141 - parent: 152 -- id: 148 + - 142 + parent: 153 +- id: 149 kind: RqOperator span: 1:207-212 targets: - - 150 - 151 - parent: 152 -- id: 150 + - 152 + parent: 153 +- id: 151 kind: Ident span: 1:207-208 ident: !Ident - this - n targets: - - 130 -- id: 151 + - 131 +- id: 152 kind: Literal span: 1:211-212 -- id: 152 +- id: 153 kind: 'TransformCall: Filter' span: 1:200-212 children: - - 144 - - 148 - parent: 158 -- id: 153 + - 145 + - 149 + parent: 159 +- id: 154 kind: RqOperator span: 1:226-231 alias: n targets: - - 155 - 156 - parent: 157 -- id: 155 + - 157 + parent: 158 +- id: 156 kind: Ident span: 1:226-227 ident: !Ident - this - n targets: - - 130 -- id: 156 + - 131 +- id: 157 kind: Literal span: 1:230-231 -- id: 157 +- id: 158 kind: Tuple span: 1:226-231 children: - - 153 - parent: 158 -- id: 158 + - 154 + parent: 159 +- id: 159 kind: 'TransformCall: Select' span: 1:215-231 children: - - 152 - - 157 -- id: 159 + - 153 + - 158 +- id: 160 kind: 'TransformCall: Loop' span: 1:194-232 children: - - 135 - - 160 - parent: 166 -- id: 160 + - 136 + - 161 + parent: 167 +- id: 161 kind: Func span: 1:215-231 - parent: 159 -- id: 161 + parent: 160 +- id: 162 kind: RqOperator span: 1:244-249 alias: n targets: - - 163 - 164 - parent: 165 -- id: 163 + - 165 + parent: 166 +- id: 164 kind: Ident span: 1:244-245 ident: !Ident - this - n targets: - - 130 -- id: 164 + - 131 +- id: 165 kind: Literal span: 1:248-249 -- id: 165 +- id: 166 kind: Tuple span: 1:244-249 children: - - 161 - parent: 166 -- id: 166 + - 162 + parent: 167 +- id: 167 kind: 'TransformCall: Select' span: 1:233-249 children: - - 159 - - 165 - parent: 169 -- id: 167 + - 160 + - 166 + parent: 170 +- id: 168 kind: Ident span: 1:255-256 ident: !Ident - this - n targets: - - 161 - parent: 169 -- id: 169 + - 162 + parent: 170 +- id: 170 kind: 'TransformCall: Sort' span: 1:250-256 children: - - 166 - 167 + - 168 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__math_module.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__math_module.snap index 04807b9a3b85..cf552c40ab7b 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__math_module.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__math_module.snap @@ -7,10 +7,10 @@ frames: - - 1:96-102 - columns: - !All - input_id: 120 + input_id: 121 except: [] inputs: - - id: 120 + - id: 121 name: invoices table: - default_db @@ -20,109 +20,109 @@ frames: - !Single name: - total_original - target_id: 125 + target_id: 126 target_name: null - !Single name: - total_x - target_id: 130 + target_id: 131 target_name: null - !Single name: - total_floor - target_id: 141 + target_id: 142 target_name: null - !Single name: - total_ceil - target_id: 144 + target_id: 145 target_name: null - !Single name: - total_log10 - target_id: 147 + target_id: 148 target_name: null - !Single name: - total_log2 - target_id: 154 + target_id: 155 target_name: null - !Single name: - total_sqrt - target_id: 162 + target_id: 163 target_name: null - !Single name: - total_ln - target_id: 169 + target_id: 170 target_name: null - !Single name: - total_cos - target_id: 178 + target_id: 179 target_name: null - !Single name: - total_sin - target_id: 187 + target_id: 188 target_name: null - !Single name: - total_tan - target_id: 196 + target_id: 197 target_name: null - !Single name: - total_deg - target_id: 205 + target_id: 206 target_name: null - !Single name: - total_square - target_id: 214 + target_id: 215 target_name: null - !Single name: - total_square_op - target_id: 223 + target_id: 224 target_name: null inputs: - - id: 120 + - id: 121 name: invoices table: - default_db - invoices nodes: -- id: 120 +- id: 121 kind: Ident span: 1:82-95 ident: !Ident - default_db - invoices - parent: 123 -- id: 123 + parent: 124 +- id: 124 kind: 'TransformCall: Take' span: 1:96-102 children: - - 120 - - 124 - parent: 232 -- id: 124 - kind: Literal - parent: 123 + - 121 + - 125 + parent: 233 - id: 125 + kind: Literal + parent: 124 +- id: 126 kind: RqOperator span: 1:142-154 alias: total_original targets: - - 128 - 129 - parent: 231 -- id: 128 + - 130 + parent: 232 +- id: 129 kind: Literal span: 1:153-154 -- id: 129 +- id: 130 kind: Ident span: 1:134-139 ident: !Ident @@ -130,33 +130,33 @@ nodes: - invoices - total targets: - - 120 -- id: 130 + - 121 +- id: 131 kind: RqOperator span: 1:205-213 alias: total_x targets: - - 132 - parent: 231 -- id: 132 + - 133 + parent: 232 +- id: 133 kind: RqOperator span: 1:190-202 targets: - - 135 - 136 -- id: 135 + - 137 +- id: 136 kind: Literal span: 1:201-202 -- id: 136 +- id: 137 kind: RqOperator span: 1:172-187 targets: - - 139 - 140 -- id: 139 + - 141 +- id: 140 kind: RqOperator span: 1:172-179 -- id: 140 +- id: 141 kind: Ident span: 1:182-187 ident: !Ident @@ -164,15 +164,15 @@ nodes: - invoices - total targets: - - 120 -- id: 141 + - 121 +- id: 142 kind: RqOperator span: 1:234-252 alias: total_floor targets: - - 143 - parent: 231 -- id: 143 + - 144 + parent: 232 +- id: 144 kind: Ident span: 1:246-251 ident: !Ident @@ -180,15 +180,15 @@ nodes: - invoices - total targets: - - 120 -- id: 144 + - 121 +- id: 145 kind: RqOperator span: 1:271-288 alias: total_ceil targets: - - 146 - parent: 231 -- id: 146 + - 147 + parent: 232 +- id: 147 kind: Ident span: 1:282-287 ident: !Ident @@ -196,24 +196,24 @@ nodes: - invoices - total targets: - - 120 -- id: 147 + - 121 +- id: 148 kind: RqOperator span: 1:328-340 alias: total_log10 targets: - - 150 - 151 - parent: 231 -- id: 150 + - 152 + parent: 232 +- id: 151 kind: Literal span: 1:339-340 -- id: 151 +- id: 152 kind: RqOperator span: 1:309-325 targets: - - 153 -- id: 153 + - 154 +- id: 154 kind: Ident span: 1:320-325 ident: !Ident @@ -221,28 +221,28 @@ nodes: - invoices - total targets: - - 120 -- id: 154 + - 121 +- id: 155 kind: RqOperator span: 1:380-392 alias: total_log2 targets: - - 157 - 158 - parent: 231 -- id: 157 + - 159 + parent: 232 +- id: 158 kind: Literal span: 1:391-392 -- id: 158 +- id: 159 kind: RqOperator span: 1:361-377 targets: - - 160 - 161 -- id: 160 + - 162 +- id: 161 kind: Literal span: 1:370-371 -- id: 161 +- id: 162 kind: Ident span: 1:372-377 ident: !Ident @@ -250,24 +250,24 @@ nodes: - invoices - total targets: - - 120 -- id: 162 + - 121 +- id: 163 kind: RqOperator span: 1:431-443 alias: total_sqrt targets: - - 165 - 166 - parent: 231 -- id: 165 + - 167 + parent: 232 +- id: 166 kind: Literal span: 1:442-443 -- id: 166 +- id: 167 kind: RqOperator span: 1:413-428 targets: - - 168 -- id: 168 + - 169 +- id: 169 kind: Ident span: 1:423-428 ident: !Ident @@ -275,29 +275,29 @@ nodes: - invoices - total targets: - - 120 -- id: 169 + - 121 +- id: 170 kind: RqOperator span: 1:489-501 alias: total_ln targets: - - 172 - 173 - parent: 231 -- id: 172 + - 174 + parent: 232 +- id: 173 kind: Literal span: 1:500-501 -- id: 173 +- id: 174 kind: RqOperator span: 1:478-486 targets: - - 175 -- id: 175 + - 176 +- id: 176 kind: RqOperator span: 1:462-475 targets: - - 177 -- id: 177 + - 178 +- id: 178 kind: Ident span: 1:470-475 ident: !Ident @@ -305,29 +305,29 @@ nodes: - invoices - total targets: - - 120 -- id: 178 + - 121 +- id: 179 kind: RqOperator span: 1:550-562 alias: total_cos targets: - - 181 - 182 - parent: 231 -- id: 181 + - 183 + parent: 232 +- id: 182 kind: Literal span: 1:561-562 -- id: 182 +- id: 183 kind: RqOperator span: 1:538-547 targets: - - 184 -- id: 184 + - 185 +- id: 185 kind: RqOperator span: 1:521-535 targets: - - 186 -- id: 186 + - 187 +- id: 187 kind: Ident span: 1:530-535 ident: !Ident @@ -335,29 +335,29 @@ nodes: - invoices - total targets: - - 120 -- id: 187 + - 121 +- id: 188 kind: RqOperator span: 1:611-623 alias: total_sin targets: - - 190 - 191 - parent: 231 -- id: 190 + - 192 + parent: 232 +- id: 191 kind: Literal span: 1:622-623 -- id: 191 +- id: 192 kind: RqOperator span: 1:599-608 targets: - - 193 -- id: 193 + - 194 +- id: 194 kind: RqOperator span: 1:582-596 targets: - - 195 -- id: 195 + - 196 +- id: 196 kind: Ident span: 1:591-596 ident: !Ident @@ -365,29 +365,29 @@ nodes: - invoices - total targets: - - 120 -- id: 196 + - 121 +- id: 197 kind: RqOperator span: 1:672-684 alias: total_tan targets: - - 199 - 200 - parent: 231 -- id: 199 + - 201 + parent: 232 +- id: 200 kind: Literal span: 1:683-684 -- id: 200 +- id: 201 kind: RqOperator span: 1:660-669 targets: - - 202 -- id: 202 + - 203 +- id: 203 kind: RqOperator span: 1:643-657 targets: - - 204 -- id: 204 + - 205 +- id: 205 kind: Ident span: 1:652-657 ident: !Ident @@ -395,29 +395,29 @@ nodes: - invoices - total targets: - - 120 -- id: 205 + - 121 +- id: 206 kind: RqOperator span: 1:742-754 alias: total_deg targets: - - 208 - 209 - parent: 231 -- id: 208 + - 210 + parent: 232 +- id: 209 kind: Literal span: 1:753-754 -- id: 209 +- id: 210 kind: RqOperator span: 1:727-739 targets: - - 211 -- id: 211 + - 212 +- id: 212 kind: RqOperator span: 1:712-724 targets: - - 213 -- id: 213 + - 214 +- id: 214 kind: Ident span: 1:704-709 ident: !Ident @@ -425,28 +425,28 @@ nodes: - invoices - total targets: - - 120 -- id: 214 + - 121 +- id: 215 kind: RqOperator span: 1:798-810 alias: total_square targets: - - 217 - 218 - parent: 231 -- id: 217 + - 219 + parent: 232 +- id: 218 kind: Literal span: 1:809-810 -- id: 218 +- id: 219 kind: RqOperator span: 1:785-795 targets: - - 221 - 222 -- id: 221 + - 223 +- id: 222 kind: Literal span: 1:794-795 -- id: 222 +- id: 223 kind: Ident span: 1:777-782 ident: !Ident @@ -454,28 +454,28 @@ nodes: - invoices - total targets: - - 120 -- id: 223 + - 121 +- id: 224 kind: RqOperator span: 1:851-863 alias: total_square_op targets: - - 226 - 227 - parent: 231 -- id: 226 + - 228 + parent: 232 +- id: 227 kind: Literal span: 1:862-863 -- id: 227 +- id: 228 kind: RqOperator span: 1:836-848 targets: - - 229 - 230 -- id: 229 + - 231 +- id: 230 kind: Literal span: 1:846-847 -- id: 230 +- id: 231 kind: Ident span: 1:837-842 ident: !Ident @@ -483,32 +483,32 @@ nodes: - invoices - total targets: - - 120 -- id: 231 + - 121 +- id: 232 kind: Tuple span: 1:110-867 children: - - 125 - - 130 - - 141 - - 144 - - 147 - - 154 - - 162 - - 169 - - 178 - - 187 - - 196 - - 205 - - 214 - - 223 - parent: 232 -- id: 232 + - 126 + - 131 + - 142 + - 145 + - 148 + - 155 + - 163 + - 170 + - 179 + - 188 + - 197 + - 206 + - 215 + - 224 + parent: 233 +- id: 233 kind: 'TransformCall: Select' span: 1:103-867 children: - - 123 - - 231 + - 124 + - 232 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__pipelines.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__pipelines.snap index a365176cfc09..e76b2258b509 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__pipelines.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__pipelines.snap @@ -7,10 +7,10 @@ frames: - - 1:179-202 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:203-248 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -29,10 +29,10 @@ frames: - - 1:249-262 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -40,10 +40,10 @@ frames: - - 1:263-273 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: tracks table: - default_db @@ -54,36 +54,36 @@ frames: name: - tracks - name - target_id: 163 + target_id: 164 target_name: null - !Single name: - tracks - composer - target_id: 164 + target_id: 165 target_name: null inputs: - - id: 129 + - id: 130 name: tracks table: - default_db - tracks nodes: -- id: 129 +- id: 130 kind: Ident span: 1:166-177 ident: !Ident - default_db - tracks - parent: 135 -- id: 131 + parent: 136 +- id: 132 kind: RqOperator span: 1:187-201 targets: - - 133 - 134 - parent: 135 -- id: 133 + - 135 + parent: 136 +- id: 134 kind: Ident span: 1:187-191 ident: !Ident @@ -91,38 +91,38 @@ nodes: - tracks - name targets: - - 129 -- id: 134 + - 130 +- id: 135 kind: Literal span: 1:195-201 -- id: 135 +- id: 136 kind: 'TransformCall: Filter' span: 1:179-202 children: - - 129 - - 131 - parent: 155 -- id: 139 + - 130 + - 132 + parent: 156 +- id: 140 kind: Literal span: 1:243-244 alias: start -- id: 140 +- id: 141 kind: Literal span: 1:246-247 alias: end -- id: 142 +- id: 143 kind: RqOperator span: 1:211-237 targets: - - 144 - - 148 -- id: 144 + - 145 + - 149 +- id: 145 kind: RqOperator span: 1:212-231 targets: - - 146 - 147 -- id: 146 + - 148 +- id: 147 kind: Ident span: 1:212-224 ident: !Ident @@ -130,38 +130,38 @@ nodes: - tracks - milliseconds targets: - - 129 -- id: 147 + - 130 +- id: 148 kind: Literal span: 1:227-231 -- id: 148 +- id: 149 kind: Literal span: 1:234-236 -- id: 149 +- id: 150 kind: RqOperator span: 1:240-247 targets: - - 151 - - 153 - parent: 155 -- id: 151 + - 152 + - 154 + parent: 156 +- id: 152 kind: RqOperator targets: - - 142 - - 139 -- id: 153 + - 143 + - 140 +- id: 154 kind: RqOperator targets: - - 142 - - 140 -- id: 155 + - 143 + - 141 +- id: 156 kind: 'TransformCall: Filter' span: 1:203-248 children: - - 135 - - 149 - parent: 158 -- id: 156 + - 136 + - 150 + parent: 159 +- id: 157 kind: Ident span: 1:254-262 ident: !Ident @@ -169,34 +169,34 @@ nodes: - tracks - track_id targets: - - 129 - parent: 158 -- id: 158 + - 130 + parent: 159 +- id: 159 kind: 'TransformCall: Sort' span: 1:249-262 children: - - 155 - 156 - parent: 162 -- id: 159 + - 157 + parent: 163 +- id: 160 kind: Literal span: 1:268-269 alias: start - parent: 162 -- id: 160 + parent: 163 +- id: 161 kind: Literal span: 1:271-273 alias: end - parent: 162 -- id: 162 + parent: 163 +- id: 163 kind: 'TransformCall: Take' span: 1:263-273 children: - - 158 - 159 - 160 - parent: 166 -- id: 163 + - 161 + parent: 167 +- id: 164 kind: Ident span: 1:282-286 ident: !Ident @@ -204,9 +204,9 @@ nodes: - tracks - name targets: - - 129 - parent: 165 -- id: 164 + - 130 + parent: 166 +- id: 165 kind: Ident span: 1:288-296 ident: !Ident @@ -214,21 +214,21 @@ nodes: - tracks - composer targets: - - 129 - parent: 165 -- id: 165 + - 130 + parent: 166 +- id: 166 kind: Tuple span: 1:281-297 children: - - 163 - 164 - parent: 166 -- id: 166 + - 165 + parent: 167 +- id: 167 kind: 'TransformCall: Select' span: 1:274-297 children: - - 162 - - 165 + - 163 + - 166 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__read_csv.snap index cff04c1b5392..d5fc9bfbbde7 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__read_csv.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__read_csv.snap @@ -7,77 +7,77 @@ frames: - - 1:92-144 - columns: - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 123 - name: _literal_123 + - id: 124 + name: _literal_124 table: - default_db - - _literal_123 - - id: 118 - name: _literal_118 + - _literal_124 + - id: 119 + name: _literal_119 table: - default_db - - _literal_118 + - _literal_119 - - 1:145-163 - columns: - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 123 - name: _literal_123 + - id: 124 + name: _literal_124 table: - default_db - - _literal_123 - - id: 118 - name: _literal_118 + - _literal_124 + - id: 119 + name: _literal_119 table: - default_db - - _literal_118 + - _literal_119 nodes: -- id: 118 +- id: 119 kind: RqOperator span: 1:100-143 targets: - - 120 - parent: 127 -- id: 120 + - 121 + parent: 128 +- id: 121 kind: Literal span: 1:110-143 -- id: 123 +- id: 124 kind: RqOperator span: 1:43-91 targets: - - 125 - parent: 127 -- id: 125 + - 126 + parent: 128 +- id: 126 kind: Literal span: 1:58-90 -- id: 127 +- id: 128 kind: 'TransformCall: Append' span: 1:92-144 children: - - 123 - - 118 - parent: 130 -- id: 128 + - 124 + - 119 + parent: 131 +- id: 129 kind: Ident span: 1:150-163 ident: !Ident - this - - _literal_123 + - _literal_124 - media_type_id targets: - - 123 - parent: 130 -- id: 130 + - 124 + parent: 131 +- id: 131 kind: 'TransformCall: Sort' span: 1:145-163 children: - - 127 - 128 + - 129 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__set_ops_remove.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__set_ops_remove.snap index 368952273829..b1b336caf6d3 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__set_ops_remove.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__set_ops_remove.snap @@ -10,167 +10,167 @@ frames: name: - t - a - target_id: 135 + target_id: 136 target_name: null inputs: - - id: 126 + - id: 127 name: t table: - default_db - - _literal_126 + - _literal_127 - - 0:3163-3240 - columns: - !Single name: - t - a - target_id: 135 + target_id: 136 target_name: null - !Single name: - b - a - target_id: 121 + target_id: 122 target_name: a inputs: - - id: 126 + - id: 127 name: t table: - default_db - - _literal_126 - - id: 121 + - _literal_127 + - id: 122 name: b table: - default_db - - _literal_121 + - _literal_122 - - 0:3243-3288 - columns: - !Single name: - t - a - target_id: 135 + target_id: 136 target_name: null - !Single name: - b - a - target_id: 121 + target_id: 122 target_name: a inputs: - - id: 126 + - id: 127 name: t table: - default_db - - _literal_126 - - id: 121 + - _literal_127 + - id: 122 name: b table: - default_db - - _literal_121 + - _literal_122 - - 1:165-238 - columns: - !Single name: - t - a - target_id: 206 + target_id: 207 target_name: null inputs: - - id: 126 + - id: 127 name: t table: - default_db - - _literal_126 - - id: 121 + - _literal_127 + - id: 122 name: b table: - default_db - - _literal_121 + - _literal_122 - - 1:239-245 - columns: - !Single name: - t - a - target_id: 206 + target_id: 207 target_name: null inputs: - - id: 126 + - id: 127 name: t table: - default_db - - _literal_126 - - id: 121 + - _literal_127 + - id: 122 name: b table: - default_db - - _literal_121 + - _literal_122 nodes: -- id: 121 +- id: 122 kind: Array span: 1:173-237 - parent: 188 -- id: 126 + parent: 189 +- id: 127 kind: Array span: 1:36-55 - parent: 153 -- id: 135 + parent: 154 +- id: 136 kind: Ident ident: !Ident - this - t - a targets: - - 126 - parent: 137 -- id: 137 + - 127 + parent: 138 +- id: 138 kind: Tuple span: 1:64-69 children: - - 135 -- id: 153 + - 136 +- id: 154 kind: 'TransformCall: Take' span: 1:71-77 children: - - 126 - - 154 - parent: 188 -- id: 154 + - 127 + - 155 + parent: 189 +- id: 155 kind: Literal - parent: 153 -- id: 177 + parent: 154 +- id: 178 kind: Ident ident: !Ident - this - t - a targets: - - 135 -- id: 180 + - 136 +- id: 181 kind: Ident ident: !Ident - that - b - a targets: - - 121 -- id: 186 + - 122 +- id: 187 kind: RqOperator span: 0:3192-3239 targets: - - 177 - - 180 - parent: 188 -- id: 188 + - 178 + - 181 + parent: 189 +- id: 189 kind: 'TransformCall: Join' span: 0:3163-3240 children: - - 153 - - 121 - - 186 - parent: 204 -- id: 196 + - 154 + - 122 + - 187 + parent: 205 +- id: 197 kind: Ident span: 0:5981-5989 ident: !Ident @@ -178,47 +178,47 @@ nodes: - b - a targets: - - 121 -- id: 200 + - 122 +- id: 201 kind: RqOperator span: 0:3251-3287 targets: - - 196 - - 203 - parent: 204 -- id: 203 + - 197 + - 204 + parent: 205 +- id: 204 kind: Literal span: 0:5993-5997 -- id: 204 +- id: 205 kind: 'TransformCall: Filter' span: 0:3243-3288 children: - - 188 - - 200 - parent: 208 -- id: 206 + - 189 + - 201 + parent: 209 +- id: 207 kind: Ident ident: !Ident - this - t - a targets: - - 135 - parent: 207 -- id: 207 + - 136 + parent: 208 +- id: 208 kind: Tuple span: 0:3298-3301 children: - - 206 - parent: 208 -- id: 208 + - 207 + parent: 209 +- id: 209 kind: 'TransformCall: Select' span: 1:165-238 children: - - 204 - - 207 - parent: 211 -- id: 209 + - 205 + - 208 + parent: 212 +- id: 210 kind: Ident span: 1:244-245 ident: !Ident @@ -226,14 +226,14 @@ nodes: - t - a targets: - - 206 - parent: 211 -- id: 211 + - 207 + parent: 212 +- id: 212 kind: 'TransformCall: Sort' span: 1:239-245 children: - - 208 - 209 + - 210 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort.snap index 3bef4a38bb50..db7de1ae6789 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort.snap @@ -7,10 +7,10 @@ frames: - - 1:30-61 - columns: - !All - input_id: 127 + input_id: 128 except: [] inputs: - - id: 127 + - id: 128 name: e table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:62-90 - columns: - !All - input_id: 127 + input_id: 128 except: [] inputs: - - id: 127 + - id: 128 name: e table: - default_db @@ -29,18 +29,18 @@ frames: - - 1:145-215 - columns: - !All - input_id: 127 + input_id: 128 except: [] - !All - input_id: 118 + input_id: 119 except: [] inputs: - - id: 127 + - id: 128 name: e table: - default_db - employees - - id: 118 + - id: 119 name: manager table: - default_db @@ -49,54 +49,54 @@ frames: - columns: - !Single name: null - target_id: 143 + target_id: 144 target_name: null - !Single name: - e - last_name - target_id: 144 + target_id: 145 target_name: null - !Single name: - manager - first_name - target_id: 145 + target_id: 146 target_name: null inputs: - - id: 127 + - id: 128 name: e table: - default_db - employees - - id: 118 + - id: 119 name: manager table: - default_db - employees nodes: -- id: 118 +- id: 119 kind: Ident span: 1:158-167 ident: !Ident - default_db - employees - parent: 142 -- id: 127 + parent: 143 +- id: 128 kind: Ident span: 1:13-29 ident: !Ident - default_db - employees - parent: 133 -- id: 129 + parent: 134 +- id: 130 kind: RqOperator span: 1:37-61 targets: - - 131 - 132 - parent: 133 -- id: 131 + - 133 + parent: 134 +- id: 132 kind: Ident span: 1:37-47 ident: !Ident @@ -104,18 +104,18 @@ nodes: - e - first_name targets: - - 127 -- id: 132 + - 128 +- id: 133 kind: Literal span: 1:51-61 -- id: 133 +- id: 134 kind: 'TransformCall: Filter' span: 1:30-61 children: - - 127 - - 129 - parent: 137 -- id: 134 + - 128 + - 130 + parent: 138 +- id: 135 kind: Ident span: 1:68-78 ident: !Ident @@ -123,9 +123,9 @@ nodes: - e - first_name targets: - - 127 - parent: 137 -- id: 135 + - 128 + parent: 138 +- id: 136 kind: Ident span: 1:80-89 ident: !Ident @@ -133,24 +133,24 @@ nodes: - e - last_name targets: - - 127 - parent: 137 -- id: 137 + - 128 + parent: 138 +- id: 138 kind: 'TransformCall: Sort' span: 1:62-90 children: - - 133 - 134 - 135 - parent: 142 -- id: 138 + - 136 + parent: 143 +- id: 139 kind: RqOperator span: 1:179-214 targets: - - 140 - 141 - parent: 142 -- id: 140 + - 142 + parent: 143 +- id: 141 kind: Ident span: 1:179-191 ident: !Ident @@ -158,8 +158,8 @@ nodes: - e - reports_to targets: - - 127 -- id: 141 + - 128 +- id: 142 kind: Ident span: 1:195-214 ident: !Ident @@ -167,16 +167,16 @@ nodes: - manager - employee_id targets: - - 118 -- id: 142 + - 119 +- id: 143 kind: 'TransformCall: Join' span: 1:145-215 children: - - 137 - - 118 - 138 - parent: 147 -- id: 143 + - 119 + - 139 + parent: 148 +- id: 144 kind: Ident span: 1:225-237 ident: !Ident @@ -184,9 +184,9 @@ nodes: - e - first_name targets: - - 127 - parent: 146 -- id: 144 + - 128 + parent: 147 +- id: 145 kind: Ident span: 1:239-250 ident: !Ident @@ -194,9 +194,9 @@ nodes: - e - last_name targets: - - 127 - parent: 146 -- id: 145 + - 128 + parent: 147 +- id: 146 kind: Ident span: 1:252-270 ident: !Ident @@ -204,22 +204,22 @@ nodes: - manager - first_name targets: - - 118 - parent: 146 -- id: 146 + - 119 + parent: 147 +- id: 147 kind: Tuple span: 1:224-271 children: - - 143 - 144 - 145 - parent: 147 -- id: 147 + - 146 + parent: 148 +- id: 148 kind: 'TransformCall: Select' span: 1:217-271 children: - - 142 - - 146 + - 143 + - 147 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_2.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_2.snap index 33dc19940168..b49dc06cb375 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_2.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_2.snap @@ -9,16 +9,16 @@ frames: - !Single name: - AA - target_id: 129 + target_id: 130 target_name: null - !Single name: - albums - artist_id - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 127 + - id: 128 name: albums table: - default_db @@ -28,16 +28,16 @@ frames: - !Single name: - AA - target_id: 129 + target_id: 130 target_name: null - !Single name: - albums - artist_id - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 127 + - id: 128 name: albums table: - default_db @@ -47,16 +47,16 @@ frames: - !Single name: - AA - target_id: 129 + target_id: 130 target_name: null - !Single name: - albums - artist_id - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 127 + - id: 128 name: albums table: - default_db @@ -66,44 +66,44 @@ frames: - !Single name: - AA - target_id: 129 + target_id: 130 target_name: null - !Single name: - albums - artist_id - target_id: 130 + target_id: 131 target_name: null - !All - input_id: 115 + input_id: 116 except: [] inputs: - - id: 127 + - id: 128 name: albums table: - default_db - albums - - id: 115 + - id: 116 name: artists table: - default_db - artists nodes: -- id: 115 +- id: 116 kind: Ident span: 1:75-82 ident: !Ident - default_db - artists - parent: 145 -- id: 127 + parent: 146 +- id: 128 kind: Ident span: 1:0-11 ident: !Ident - default_db - albums - parent: 132 -- id: 129 + parent: 133 +- id: 130 kind: Ident span: 1:24-32 alias: AA @@ -112,9 +112,9 @@ nodes: - albums - album_id targets: - - 127 - parent: 131 -- id: 130 + - 128 + parent: 132 +- id: 131 kind: Ident span: 1:34-43 ident: !Ident @@ -122,71 +122,71 @@ nodes: - albums - artist_id targets: - - 127 - parent: 131 -- id: 131 + - 128 + parent: 132 +- id: 132 kind: Tuple span: 1:19-45 children: - - 129 - 130 - parent: 132 -- id: 132 + - 131 + parent: 133 +- id: 133 kind: 'TransformCall: Select' span: 1:12-45 children: - - 127 - - 131 - parent: 135 -- id: 133 + - 128 + - 132 + parent: 136 +- id: 134 kind: Ident span: 1:51-53 ident: !Ident - this - AA targets: - - 129 - parent: 135 -- id: 135 + - 130 + parent: 136 +- id: 136 kind: 'TransformCall: Sort' span: 1:46-53 children: - - 132 - 133 - parent: 140 -- id: 136 + - 134 + parent: 141 +- id: 137 kind: RqOperator span: 1:61-69 targets: - - 138 - 139 - parent: 140 -- id: 138 + - 140 + parent: 141 +- id: 139 kind: Ident span: 1:61-63 ident: !Ident - this - AA targets: - - 129 -- id: 139 + - 130 +- id: 140 kind: Literal span: 1:67-69 -- id: 140 +- id: 141 kind: 'TransformCall: Filter' span: 1:54-69 children: - - 135 - 136 - parent: 145 -- id: 141 + - 137 + parent: 146 +- id: 142 kind: RqOperator span: 1:84-95 targets: - - 143 - 144 - parent: 145 -- id: 143 + - 145 + parent: 146 +- id: 144 kind: Ident span: 1:86-95 ident: !Ident @@ -194,8 +194,8 @@ nodes: - albums - artist_id targets: - - 130 -- id: 144 + - 131 +- id: 145 kind: Ident span: 1:86-95 ident: !Ident @@ -203,14 +203,14 @@ nodes: - artists - artist_id targets: - - 115 -- id: 145 + - 116 +- id: 146 kind: 'TransformCall: Join' span: 1:70-96 children: - - 140 - - 115 - 141 + - 116 + - 142 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_3.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_3.snap index 6a313d3ea61e..3b4465152e42 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_3.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__sort_3.snap @@ -9,565 +9,565 @@ frames: - !Single name: - AA - target_id: 149 + target_id: 150 target_name: null - !Single name: - - _literal_143 + - _literal_144 - album_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 + - _literal_144 - - 1:87-94 - columns: - !Single name: - AA - target_id: 149 + target_id: 150 target_name: null - !Single name: - - _literal_143 + - _literal_144 - album_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 + - _literal_144 - - 1:95-158 - columns: - !Single name: - AA - target_id: 149 + target_id: 150 target_name: null - !Single name: - - _literal_143 + - _literal_144 - album_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 151 + target_id: 152 target_name: null - !Single name: - - _literal_131 + - _literal_132 - album_id - target_id: 131 + target_id: 132 target_name: album_id - !Single name: - - _literal_131 + - _literal_132 - album_title - target_id: 131 + target_id: 132 target_name: album_title inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 - - id: 131 - name: _literal_131 + - _literal_144 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:159-213 - columns: - !Single name: - AA - target_id: 162 + target_id: 163 target_name: null - !Single name: - AT - target_id: 163 + target_id: 164 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 167 + target_id: 168 target_name: null inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 - - id: 131 - name: _literal_131 + - _literal_144 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:214-228 - columns: - !Single name: - AA - target_id: 162 + target_id: 163 target_name: null - !Single name: - AT - target_id: 163 + target_id: 164 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 167 + target_id: 168 target_name: null inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 - - id: 131 - name: _literal_131 + - _literal_144 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 + - _literal_132 - - 1:229-291 - columns: - !Single name: - AA - target_id: 162 + target_id: 163 target_name: null - !Single name: - AT - target_id: 163 + target_id: 164 target_name: null - !Single name: - - _literal_143 + - _literal_144 - genre_id - target_id: 167 + target_id: 168 target_name: null - !Single name: - - _literal_118 + - _literal_119 - genre_id - target_id: 118 + target_id: 119 target_name: genre_id - !Single name: - - _literal_118 + - _literal_119 - genre_title - target_id: 118 + target_id: 119 target_name: genre_title inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 - - id: 131 - name: _literal_131 + - _literal_144 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 - - id: 118 - name: _literal_118 + - _literal_132 + - id: 119 + name: _literal_119 table: - default_db - - _literal_118 + - _literal_119 - - 1:292-340 - columns: - !Single name: - AA - target_id: 180 + target_id: 181 target_name: null - !Single name: - AT - target_id: 181 + target_id: 182 target_name: null - !Single name: - GT - target_id: 182 + target_id: 183 target_name: null inputs: - - id: 143 - name: _literal_143 + - id: 144 + name: _literal_144 table: - default_db - - _literal_143 - - id: 131 - name: _literal_131 + - _literal_144 + - id: 132 + name: _literal_132 table: - default_db - - _literal_131 - - id: 118 - name: _literal_118 + - _literal_132 + - id: 119 + name: _literal_119 table: - default_db - - _literal_118 + - _literal_119 nodes: -- id: 118 +- id: 119 kind: Array span: 1:244-278 children: - - 119 - parent: 179 -- id: 119 + - 120 + parent: 180 +- id: 120 kind: Tuple span: 1:245-277 children: - - 120 - 121 - parent: 118 -- id: 120 + - 122 + parent: 119 +- id: 121 kind: Literal span: 1:255-256 alias: genre_id - parent: 119 -- id: 121 + parent: 120 +- id: 122 kind: Literal span: 1:270-276 alias: genre_title - parent: 119 -- id: 131 + parent: 120 +- id: 132 kind: Array span: 1:110-145 children: - - 132 - parent: 161 -- id: 132 + - 133 + parent: 162 +- id: 133 kind: Tuple span: 1:111-144 children: - - 133 - 134 - parent: 131 -- id: 133 + - 135 + parent: 132 +- id: 134 kind: Literal span: 1:121-122 alias: album_id - parent: 132 -- id: 134 + parent: 133 +- id: 135 kind: Literal span: 1:136-143 alias: album_title - parent: 132 -- id: 143 + parent: 133 +- id: 144 kind: Array span: 1:0-43 children: - - 144 - parent: 153 -- id: 144 + - 145 + parent: 154 +- id: 145 kind: Tuple span: 1:6-42 children: - - 145 - 146 - 147 - parent: 143 -- id: 145 + - 148 + parent: 144 +- id: 146 kind: Literal span: 1:16-17 alias: track_id - parent: 144 -- id: 146 + parent: 145 +- id: 147 kind: Literal span: 1:28-29 alias: album_id - parent: 144 -- id: 147 + parent: 145 +- id: 148 kind: Literal span: 1:40-41 alias: genre_id - parent: 144 -- id: 149 + parent: 145 +- id: 150 kind: Ident span: 1:56-64 alias: AA ident: !Ident - this - - _literal_143 + - _literal_144 - track_id targets: - - 143 - parent: 152 -- id: 150 + - 144 + parent: 153 +- id: 151 kind: Ident span: 1:66-74 ident: !Ident - this - - _literal_143 + - _literal_144 - album_id targets: - - 143 - parent: 152 -- id: 151 + - 144 + parent: 153 +- id: 152 kind: Ident span: 1:76-84 ident: !Ident - this - - _literal_143 + - _literal_144 - genre_id targets: - - 143 - parent: 152 -- id: 152 + - 144 + parent: 153 +- id: 153 kind: Tuple span: 1:51-86 children: - - 149 - 150 - 151 - parent: 153 -- id: 153 + - 152 + parent: 154 +- id: 154 kind: 'TransformCall: Select' span: 1:44-86 children: - - 143 - - 152 - parent: 156 -- id: 154 + - 144 + - 153 + parent: 157 +- id: 155 kind: Ident span: 1:92-94 ident: !Ident - this - AA targets: - - 149 - parent: 156 -- id: 156 + - 150 + parent: 157 +- id: 157 kind: 'TransformCall: Sort' span: 1:87-94 children: - - 153 - 154 - parent: 161 -- id: 157 + - 155 + parent: 162 +- id: 158 kind: RqOperator span: 1:147-157 targets: - - 159 - 160 - parent: 161 -- id: 159 + - 161 + parent: 162 +- id: 160 kind: Ident span: 1:149-157 ident: !Ident - this - - _literal_143 + - _literal_144 - album_id targets: - - 150 -- id: 160 + - 151 +- id: 161 kind: Ident span: 1:149-157 ident: !Ident - that - - _literal_131 + - _literal_132 - album_id targets: - - 131 -- id: 161 + - 132 +- id: 162 kind: 'TransformCall: Join' span: 1:95-158 children: - - 156 - - 131 - 157 - parent: 169 -- id: 162 + - 132 + - 158 + parent: 170 +- id: 163 kind: Ident span: 1:168-170 ident: !Ident - this - AA targets: - - 149 - parent: 168 -- id: 163 + - 150 + parent: 169 +- id: 164 kind: RqOperator span: 1:177-201 alias: AT targets: - - 165 - 166 - parent: 168 -- id: 165 + - 167 + parent: 169 +- id: 166 kind: Ident span: 1:177-188 ident: !Ident - this - - _literal_131 + - _literal_132 - album_title targets: - - 131 -- id: 166 + - 132 +- id: 167 kind: Literal span: 1:192-201 -- id: 167 +- id: 168 kind: Ident span: 1:203-211 ident: !Ident - this - - _literal_143 + - _literal_144 - genre_id targets: - - 151 - parent: 168 -- id: 168 + - 152 + parent: 169 +- id: 169 kind: Tuple span: 1:166-213 children: - - 162 - 163 - - 167 - parent: 169 -- id: 169 + - 164 + - 168 + parent: 170 +- id: 170 kind: 'TransformCall: Select' span: 1:159-213 children: - - 161 - - 168 - parent: 174 -- id: 170 + - 162 + - 169 + parent: 175 +- id: 171 kind: RqOperator span: 1:221-228 targets: - - 172 - 173 - parent: 174 -- id: 172 + - 174 + parent: 175 +- id: 173 kind: Ident span: 1:221-223 ident: !Ident - this - AA targets: - - 162 -- id: 173 + - 163 +- id: 174 kind: Literal span: 1:226-228 -- id: 174 +- id: 175 kind: 'TransformCall: Filter' span: 1:214-228 children: - - 169 - 170 - parent: 179 -- id: 175 + - 171 + parent: 180 +- id: 176 kind: RqOperator span: 1:280-290 targets: - - 177 - 178 - parent: 179 -- id: 177 + - 179 + parent: 180 +- id: 178 kind: Ident span: 1:282-290 ident: !Ident - this - - _literal_143 + - _literal_144 - genre_id targets: - - 167 -- id: 178 + - 168 +- id: 179 kind: Ident span: 1:282-290 ident: !Ident - that - - _literal_118 + - _literal_119 - genre_id targets: - - 118 -- id: 179 + - 119 +- id: 180 kind: 'TransformCall: Join' span: 1:229-291 children: - - 174 - - 118 - 175 - parent: 187 -- id: 180 + - 119 + - 176 + parent: 188 +- id: 181 kind: Ident span: 1:301-303 ident: !Ident - this - AA targets: - - 162 - parent: 186 -- id: 181 + - 163 + parent: 187 +- id: 182 kind: Ident span: 1:305-307 ident: !Ident - this - AT targets: - - 163 - parent: 186 -- id: 182 + - 164 + parent: 187 +- id: 183 kind: RqOperator span: 1:314-338 alias: GT targets: - - 184 - 185 - parent: 186 -- id: 184 + - 186 + parent: 187 +- id: 185 kind: Ident span: 1:314-325 ident: !Ident - this - - _literal_118 + - _literal_119 - genre_title targets: - - 118 -- id: 185 + - 119 +- id: 186 kind: Literal span: 1:329-338 -- id: 186 +- id: 187 kind: Tuple span: 1:299-340 children: - - 180 - 181 - 182 - parent: 187 -- id: 187 + - 183 + parent: 188 +- id: 188 kind: 'TransformCall: Select' span: 1:292-340 children: - - 179 - - 186 + - 180 + - 187 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__switch.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__switch.snap index 74b3df5fe1dc..45387d65e704 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__switch.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__switch.snap @@ -7,10 +7,10 @@ frames: - - 1:101-118 - columns: - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -20,10 +20,10 @@ frames: - !Single name: - display - target_id: 128 + target_id: 129 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db @@ -33,23 +33,23 @@ frames: - !Single name: - display - target_id: 128 + target_id: 129 target_name: null inputs: - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:89-100 ident: !Ident - default_db - tracks - parent: 127 -- id: 125 + parent: 128 +- id: 126 kind: Ident span: 1:106-118 ident: !Ident @@ -57,34 +57,34 @@ nodes: - tracks - milliseconds targets: - - 123 - parent: 127 -- id: 127 + - 124 + parent: 128 +- id: 128 kind: 'TransformCall: Sort' span: 1:101-118 children: - - 123 - - 125 - parent: 142 -- id: 128 + - 124 + - 126 + parent: 143 +- id: 129 kind: Case span: 1:136-246 alias: display targets: - - 129 - - 133 + - 130 - 134 - - 138 + - 135 - 139 - 140 - parent: 141 -- id: 129 + - 141 + parent: 142 +- id: 130 kind: RqOperator span: 1:147-163 targets: - - 131 - 132 -- id: 131 + - 133 +- id: 132 kind: Ident span: 1:147-155 ident: !Ident @@ -92,11 +92,11 @@ nodes: - tracks - composer targets: - - 123 -- id: 132 + - 124 +- id: 133 kind: Literal span: 1:159-163 -- id: 133 +- id: 134 kind: Ident span: 1:167-175 ident: !Ident @@ -104,14 +104,14 @@ nodes: - tracks - composer targets: - - 123 -- id: 134 + - 124 +- id: 135 kind: RqOperator span: 1:181-194 targets: - - 136 - 137 -- id: 136 + - 138 +- id: 137 kind: Ident span: 1:181-189 ident: !Ident @@ -119,41 +119,41 @@ nodes: - tracks - genre_id targets: - - 123 -- id: 137 + - 124 +- id: 138 kind: Literal span: 1:192-194 -- id: 138 +- id: 139 kind: Literal span: 1:198-211 -- id: 139 +- id: 140 kind: Literal span: 1:217-221 -- id: 140 +- id: 141 kind: FString span: 1:225-244 -- id: 141 +- id: 142 kind: Tuple span: 1:136-246 children: - - 128 - parent: 142 -- id: 142 + - 129 + parent: 143 +- id: 143 kind: 'TransformCall: Select' span: 1:119-246 children: - - 127 - - 141 - parent: 144 -- id: 144 + - 128 + - 142 + parent: 145 +- id: 145 kind: 'TransformCall: Take' span: 1:247-254 children: - - 142 - - 145 -- id: 145 + - 143 + - 146 +- id: 146 kind: Literal - parent: 144 + parent: 145 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__take.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__take.snap index 5a9e4058c534..3155ca37ba1b 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__take.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__take.snap @@ -7,10 +7,10 @@ frames: - - 1:25-41 - columns: - !All - input_id: 120 + input_id: 121 except: [] inputs: - - id: 120 + - id: 121 name: tracks table: - default_db @@ -18,23 +18,23 @@ frames: - - 1:42-51 - columns: - !All - input_id: 120 + input_id: 121 except: [] inputs: - - id: 120 + - id: 121 name: tracks table: - default_db - tracks nodes: -- id: 120 +- id: 121 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 124 -- id: 122 + parent: 125 +- id: 123 kind: Ident span: 1:31-40 ident: !Ident @@ -42,32 +42,32 @@ nodes: - tracks - track_id targets: - - 120 - parent: 124 -- id: 124 + - 121 + parent: 125 +- id: 125 kind: 'TransformCall: Sort' span: 1:25-41 children: - - 120 - - 122 - parent: 128 -- id: 125 + - 121 + - 123 + parent: 129 +- id: 126 kind: Literal span: 1:47-48 alias: start - parent: 128 -- id: 126 + parent: 129 +- id: 127 kind: Literal span: 1:50-51 alias: end - parent: 128 -- id: 128 + parent: 129 +- id: 129 kind: 'TransformCall: Take' span: 1:42-51 children: - - 124 - 125 - 126 + - 127 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__text_module.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__text_module.snap index e104192eb4a5..d9a041d7f748 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__text_module.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__text_module.snap @@ -10,55 +10,55 @@ frames: name: - albums - title - target_id: 125 + target_id: 126 target_name: null - !Single name: - title_and_spaces - target_id: 126 + target_id: 127 target_name: null - !Single name: - low - target_id: 128 + target_id: 129 target_name: null - !Single name: - up - target_id: 131 + target_id: 132 target_name: null - !Single name: - ltrimmed - target_id: 134 + target_id: 135 target_name: null - !Single name: - rtrimmed - target_id: 137 + target_id: 138 target_name: null - !Single name: - trimmed - target_id: 140 + target_id: 141 target_name: null - !Single name: - len - target_id: 143 + target_id: 144 target_name: null - !Single name: - subs - target_id: 146 + target_id: 147 target_name: null - !Single name: - replace - target_id: 152 + target_id: 153 target_name: null inputs: - - id: 123 + - id: 124 name: albums table: - default_db @@ -69,55 +69,55 @@ frames: name: - albums - title - target_id: 125 + target_id: 126 target_name: null - !Single name: - title_and_spaces - target_id: 126 + target_id: 127 target_name: null - !Single name: - low - target_id: 128 + target_id: 129 target_name: null - !Single name: - up - target_id: 131 + target_id: 132 target_name: null - !Single name: - ltrimmed - target_id: 134 + target_id: 135 target_name: null - !Single name: - rtrimmed - target_id: 137 + target_id: 138 target_name: null - !Single name: - trimmed - target_id: 140 + target_id: 141 target_name: null - !Single name: - len - target_id: 143 + target_id: 144 target_name: null - !Single name: - subs - target_id: 146 + target_id: 147 target_name: null - !Single name: - replace - target_id: 152 + target_id: 153 target_name: null inputs: - - id: 123 + - id: 124 name: albums table: - default_db @@ -128,68 +128,68 @@ frames: name: - albums - title - target_id: 125 + target_id: 126 target_name: null - !Single name: - title_and_spaces - target_id: 126 + target_id: 127 target_name: null - !Single name: - low - target_id: 128 + target_id: 129 target_name: null - !Single name: - up - target_id: 131 + target_id: 132 target_name: null - !Single name: - ltrimmed - target_id: 134 + target_id: 135 target_name: null - !Single name: - rtrimmed - target_id: 137 + target_id: 138 target_name: null - !Single name: - trimmed - target_id: 140 + target_id: 141 target_name: null - !Single name: - len - target_id: 143 + target_id: 144 target_name: null - !Single name: - subs - target_id: 146 + target_id: 147 target_name: null - !Single name: - replace - target_id: 152 + target_id: 153 target_name: null inputs: - - id: 123 + - id: 124 name: albums table: - default_db - albums nodes: -- id: 123 +- id: 124 kind: Ident span: 1:115-126 ident: !Ident - default_db - albums - parent: 159 -- id: 125 + parent: 160 +- id: 126 kind: Ident span: 1:140-145 ident: !Ident @@ -197,16 +197,16 @@ nodes: - albums - title targets: - - 123 - parent: 158 -- id: 126 + - 124 + parent: 159 +- id: 127 kind: FString span: 1:170-184 alias: title_and_spaces targets: - - 127 - parent: 158 -- id: 127 + - 128 + parent: 159 +- id: 128 kind: Ident span: 1:175-180 ident: !Ident @@ -214,15 +214,15 @@ nodes: - albums - title targets: - - 123 -- id: 128 + - 124 +- id: 129 kind: RqOperator span: 1:205-215 alias: low targets: - - 130 - parent: 158 -- id: 130 + - 131 + parent: 159 +- id: 131 kind: Ident span: 1:197-202 ident: !Ident @@ -230,15 +230,15 @@ nodes: - albums - title targets: - - 123 -- id: 131 + - 124 +- id: 132 kind: RqOperator span: 1:236-246 alias: up targets: - - 133 - parent: 158 -- id: 133 + - 134 + parent: 159 +- id: 134 kind: Ident span: 1:228-233 ident: !Ident @@ -246,15 +246,15 @@ nodes: - albums - title targets: - - 123 -- id: 134 + - 124 +- id: 135 kind: RqOperator span: 1:273-283 alias: ltrimmed targets: - - 136 - parent: 158 -- id: 136 + - 137 + parent: 159 +- id: 137 kind: Ident span: 1:265-270 ident: !Ident @@ -262,15 +262,15 @@ nodes: - albums - title targets: - - 123 -- id: 137 + - 124 +- id: 138 kind: RqOperator span: 1:310-320 alias: rtrimmed targets: - - 139 - parent: 158 -- id: 139 + - 140 + parent: 159 +- id: 140 kind: Ident span: 1:302-307 ident: !Ident @@ -278,15 +278,15 @@ nodes: - albums - title targets: - - 123 -- id: 140 + - 124 +- id: 141 kind: RqOperator span: 1:346-355 alias: trimmed targets: - - 142 - parent: 158 -- id: 142 + - 143 + parent: 159 +- id: 143 kind: Ident span: 1:338-343 ident: !Ident @@ -294,15 +294,15 @@ nodes: - albums - title targets: - - 123 -- id: 143 + - 124 +- id: 144 kind: RqOperator span: 1:377-388 alias: len targets: - - 145 - parent: 158 -- id: 145 + - 146 + parent: 159 +- id: 146 kind: Ident span: 1:369-374 ident: !Ident @@ -310,23 +310,23 @@ nodes: - albums - title targets: - - 123 -- id: 146 + - 124 +- id: 147 kind: RqOperator span: 1:411-427 alias: subs targets: - - 149 - 150 - 151 - parent: 158 -- id: 149 + - 152 + parent: 159 +- id: 150 kind: Literal span: 1:424-425 -- id: 150 +- id: 151 kind: Literal span: 1:426-427 -- id: 151 +- id: 152 kind: Ident span: 1:403-408 ident: !Ident @@ -334,23 +334,23 @@ nodes: - albums - title targets: - - 123 -- id: 152 + - 124 +- id: 153 kind: RqOperator span: 1:453-477 alias: replace targets: - - 155 - 156 - 157 - parent: 158 -- id: 155 + - 158 + parent: 159 +- id: 156 kind: Literal span: 1:466-470 -- id: 156 +- id: 157 kind: Literal span: 1:471-477 -- id: 157 +- id: 158 kind: Ident span: 1:445-450 ident: !Ident @@ -358,30 +358,30 @@ nodes: - albums - title targets: - - 123 -- id: 158 + - 124 +- id: 159 kind: Tuple span: 1:134-481 children: - - 125 - 126 - - 128 - - 131 - - 134 - - 137 - - 140 - - 143 - - 146 - - 152 - parent: 159 -- id: 159 + - 127 + - 129 + - 132 + - 135 + - 138 + - 141 + - 144 + - 147 + - 153 + parent: 160 +- id: 160 kind: 'TransformCall: Select' span: 1:127-481 children: - - 123 - - 158 - parent: 162 -- id: 160 + - 124 + - 159 + parent: 163 +- id: 161 kind: Ident span: 1:488-493 ident: !Ident @@ -389,38 +389,38 @@ nodes: - albums - title targets: - - 125 - parent: 162 -- id: 162 + - 126 + parent: 163 +- id: 163 kind: 'TransformCall: Sort' span: 1:482-494 children: - - 159 - 160 - parent: 182 -- id: 163 + - 161 + parent: 183 +- id: 164 kind: RqOperator span: 1:502-606 targets: - - 165 - - 177 - parent: 182 -- id: 165 + - 166 + - 178 + parent: 183 +- id: 166 kind: RqOperator span: 1:502-573 targets: - - 167 - - 172 -- id: 167 + - 168 + - 173 +- id: 168 kind: RqOperator span: 1:511-535 targets: - - 170 - 171 -- id: 170 + - 172 +- id: 171 kind: Literal span: 1:528-535 -- id: 171 +- id: 172 kind: Ident span: 1:503-508 ident: !Ident @@ -428,17 +428,17 @@ nodes: - albums - title targets: - - 125 -- id: 172 + - 126 +- id: 173 kind: RqOperator span: 1:549-572 targets: - - 175 - 176 -- id: 175 + - 177 +- id: 176 kind: Literal span: 1:563-572 -- id: 176 +- id: 177 kind: Ident span: 1:541-546 ident: !Ident @@ -446,17 +446,17 @@ nodes: - albums - title targets: - - 125 -- id: 177 + - 126 +- id: 178 kind: RqOperator span: 1:586-605 targets: - - 180 - 181 -- id: 180 + - 182 +- id: 181 kind: Literal span: 1:601-605 -- id: 181 +- id: 182 kind: Ident span: 1:578-583 ident: !Ident @@ -464,13 +464,13 @@ nodes: - albums - title targets: - - 125 -- id: 182 + - 126 +- id: 183 kind: 'TransformCall: Filter' span: 1:495-606 children: - - 162 - 163 + - 164 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__window.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__window.snap index 301859bedd5e..fe50146de194 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__window.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__debug_lineage__window.snap @@ -7,26 +7,26 @@ frames: - - 1:521-614 - columns: - !All - input_id: 126 + input_id: 127 except: - genre_id - !Single name: - num - target_id: 164 + target_id: 165 target_name: null - !Single name: - total - target_id: 172 + target_id: 173 target_name: null - !Single name: - last_val - target_id: 174 + target_id: 175 target_name: null inputs: - - id: 126 + - id: 127 name: tracks table: - default_db @@ -37,29 +37,29 @@ frames: name: - tracks - genre_id - target_id: 128 + target_id: 129 target_name: null - !All - input_id: 126 + input_id: 127 except: - genre_id - !Single name: - num - target_id: 164 + target_id: 165 target_name: null - !Single name: - total - target_id: 172 + target_id: 173 target_name: null - !Single name: - last_val - target_id: 174 + target_id: 175 target_name: null inputs: - - id: 126 + - id: 127 name: tracks table: - default_db @@ -70,29 +70,29 @@ frames: name: - tracks - genre_id - target_id: 128 + target_id: 129 target_name: null - !All - input_id: 126 + input_id: 127 except: - genre_id - !Single name: - num - target_id: 164 + target_id: 165 target_name: null - !Single name: - total - target_id: 172 + target_id: 173 target_name: null - !Single name: - last_val - target_id: 174 + target_id: 175 target_name: null inputs: - - id: 126 + - id: 127 name: tracks table: - default_db @@ -103,31 +103,31 @@ frames: name: - tracks - track_id - target_id: 188 + target_id: 189 target_name: null - !Single name: - tracks - genre_id - target_id: 189 + target_id: 190 target_name: null - !Single name: - num - target_id: 190 + target_id: 191 target_name: null - !Single name: - total - target_id: 191 + target_id: 192 target_name: null - !Single name: - last_val - target_id: 192 + target_id: 193 target_name: null inputs: - - id: 126 + - id: 127 name: tracks table: - default_db @@ -138,44 +138,44 @@ frames: name: - tracks - track_id - target_id: 188 + target_id: 189 target_name: null - !Single name: - tracks - genre_id - target_id: 189 + target_id: 190 target_name: null - !Single name: - num - target_id: 190 + target_id: 191 target_name: null - !Single name: - total - target_id: 191 + target_id: 192 target_name: null - !Single name: - last_val - target_id: 192 + target_id: 193 target_name: null inputs: - - id: 126 + - id: 127 name: tracks table: - default_db - tracks nodes: -- id: 126 +- id: 127 kind: Ident span: 1:470-481 ident: !Ident - default_db - tracks - parent: 178 -- id: 128 + parent: 179 +- id: 129 kind: Ident span: 1:488-496 ident: !Ident @@ -183,14 +183,14 @@ nodes: - tracks - genre_id targets: - - 126 - parent: 137 -- id: 137 + - 127 + parent: 138 +- id: 138 kind: Tuple span: 1:488-496 children: - - 128 -- id: 156 + - 129 +- id: 157 kind: Ident span: 1:506-518 ident: !Ident @@ -198,33 +198,33 @@ nodes: - tracks - milliseconds targets: - - 126 -- id: 164 + - 127 +- id: 165 kind: RqOperator span: 1:540-555 alias: num targets: - - 165 - parent: 177 -- id: 165 + - 166 + parent: 178 +- id: 166 kind: Literal -- id: 172 +- id: 173 kind: RqOperator span: 1:569-579 alias: total targets: - - 173 - parent: 177 -- id: 173 - kind: Literal + - 174 + parent: 178 - id: 174 + kind: Literal +- id: 175 kind: RqOperator span: 1:596-609 alias: last_val targets: - - 176 - parent: 177 -- id: 176 + - 177 + parent: 178 +- id: 177 kind: Ident span: 1:601-609 ident: !Ident @@ -232,33 +232,33 @@ nodes: - tracks - track_id targets: - - 126 -- id: 177 + - 127 +- id: 178 kind: Tuple span: 1:528-614 children: - - 164 - - 172 - - 174 - parent: 178 -- id: 178 + - 165 + - 173 + - 175 + parent: 179 +- id: 179 kind: 'TransformCall: Derive' span: 1:521-614 children: - - 126 - - 177 - parent: 180 -- id: 180 + - 127 + - 178 + parent: 181 +- id: 181 kind: 'TransformCall: Take' span: 1:617-624 children: - - 178 - - 181 - parent: 187 -- id: 181 + - 179 + - 182 + parent: 188 +- id: 182 kind: Literal - parent: 180 -- id: 184 + parent: 181 +- id: 185 kind: Ident span: 1:633-641 ident: !Ident @@ -266,9 +266,9 @@ nodes: - tracks - genre_id targets: - - 128 - parent: 187 -- id: 185 + - 129 + parent: 188 +- id: 186 kind: Ident span: 1:643-655 ident: !Ident @@ -276,17 +276,17 @@ nodes: - tracks - milliseconds targets: - - 126 - parent: 187 -- id: 187 + - 127 + parent: 188 +- id: 188 kind: 'TransformCall: Sort' span: 1:627-656 children: - - 180 - - 184 + - 181 - 185 - parent: 194 -- id: 188 + - 186 + parent: 195 +- id: 189 kind: Ident span: 1:665-673 ident: !Ident @@ -294,9 +294,9 @@ nodes: - tracks - track_id targets: - - 126 - parent: 193 -- id: 189 + - 127 + parent: 194 +- id: 190 kind: Ident span: 1:675-683 ident: !Ident @@ -304,60 +304,60 @@ nodes: - tracks - genre_id targets: - - 128 - parent: 193 -- id: 190 + - 129 + parent: 194 +- id: 191 kind: Ident span: 1:685-688 ident: !Ident - this - num targets: - - 164 - parent: 193 -- id: 191 + - 165 + parent: 194 +- id: 192 kind: Ident span: 1:690-695 ident: !Ident - this - total targets: - - 172 - parent: 193 -- id: 192 + - 173 + parent: 194 +- id: 193 kind: Ident span: 1:697-705 ident: !Ident - this - last_val targets: - - 174 - parent: 193 -- id: 193 + - 175 + parent: 194 +- id: 194 kind: Tuple span: 1:664-706 children: - - 188 - 189 - 190 - 191 - 192 - parent: 194 -- id: 194 + - 193 + parent: 195 +- id: 195 kind: 'TransformCall: Select' span: 1:657-706 children: - - 187 - - 193 - parent: 199 -- id: 195 + - 188 + - 194 + parent: 200 +- id: 196 kind: RqOperator span: 1:714-728 targets: - - 197 - 198 - parent: 199 -- id: 197 + - 199 + parent: 200 +- id: 198 kind: Ident span: 1:714-722 ident: !Ident @@ -365,16 +365,16 @@ nodes: - tracks - genre_id targets: - - 189 -- id: 198 + - 190 +- id: 199 kind: Literal span: 1:726-728 -- id: 199 +- id: 200 kind: 'TransformCall: Filter' span: 1:707-728 children: - - 194 - 195 + - 196 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/sql.rs b/prqlc/prqlc/tests/integration/sql.rs index dd9bd6d0d5c0..66647c92962d 100644 --- a/prqlc/prqlc/tests/integration/sql.rs +++ b/prqlc/prqlc/tests/integration/sql.rs @@ -5157,6 +5157,59 @@ fn test_datetime_parsing() { ); } +#[test] +fn test_now() { + assert_snapshot!(compile(r#" + from test_tables + filter test_time < date.now + "#).unwrap(), @r" + SELECT + * + FROM + test_tables + WHERE + test_time < CURRENT_TIMESTAMP + "); + // MySQL uses NOW() + assert_snapshot!(compile(r#" + prql target:sql.mysql + from test_tables + filter test_time < date.now + "#).unwrap(), @r" + SELECT + * + FROM + test_tables + WHERE + test_time < NOW() + "); + // BigQuery uses CURRENT_TIMESTAMP() + assert_snapshot!(compile(r#" + prql target:sql.bigquery + from test_tables + filter test_time < date.now + "#).unwrap(), @r" + SELECT + * + FROM + test_tables + WHERE + test_time < CURRENT_TIMESTAMP() + "); + // Clickhouse uses now() + assert_snapshot!(compile(r#" + prql target:sql.clickhouse + from test_tables + filter test_time < date.now + "#).unwrap(), @r" + SELECT + * + FROM + test_tables + WHERE + test_time < now() + "); +} #[test] fn test_lower() { assert_snapshot!(compile(r#" diff --git a/web/book/src/reference/stdlib/README.md b/web/book/src/reference/stdlib/README.md index c6eaa0248255..66c92d8e6d95 100644 --- a/web/book/src/reference/stdlib/README.md +++ b/web/book/src/reference/stdlib/README.md @@ -27,7 +27,7 @@ from employees derive { gross_salary = (salary + payroll_tax | as int), gross_salary_rounded = (gross_salary | math.round 0), - time = s"NOW()", # an s-string, given no `now` function exists in PRQL + time = date.now, # current timestamp; or use s"NOW()" for a dialect-specific s-string } ``` diff --git a/web/book/src/reference/stdlib/date.md b/web/book/src/reference/stdlib/date.md index 6cec64bd9c35..d7fa94faa35f 100644 --- a/web/book/src/reference/stdlib/date.md +++ b/web/book/src/reference/stdlib/date.md @@ -43,6 +43,20 @@ select (invoice_date | date.to_text "%d/%m/%Y") ``` +### `now` + +Returns the current date and time as a timestamp. + +```prql +from test_tables +filter test_time < date.now +``` + +The SQL output varies by dialect: | Dialect | SQL output | | ---------- | +--------------------- | | Generic | `CURRENT_TIMESTAMP` | | MySQL | `NOW()` | | +BigQuery | `CURRENT_TIMESTAMP()` | | Clickhouse | `now()` | | Others | +`CURRENT_TIMESTAMP` | + ### Date & time format specifiers PRQL specifiers for date and time formatting is a subset of specifiers used by diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__README__standard-library__0.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__README__standard-library__0.snap index e18e0afb9b37..5e17f443c3d2 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__README__standard-library__0.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__README__standard-library__0.snap @@ -1,11 +1,11 @@ --- source: web/book/tests/documentation/book.rs -expression: "from employees\nderive {\n gross_salary = (salary + payroll_tax | as int),\n gross_salary_rounded = (gross_salary | math.round 0),\n time = s\"NOW()\", # an s-string, given no `now` function exists in PRQL\n}\n" +expression: "from employees\nderive {\n gross_salary = (salary + payroll_tax | as int),\n gross_salary_rounded = (gross_salary | math.round 0),\n time = date.now, # current timestamp; or use s\"NOW()\" for a dialect-specific s-string\n}\n" --- SELECT *, CAST(salary + payroll_tax AS int) AS gross_salary, ROUND(CAST(salary + payroll_tax AS int), 0) AS gross_salary_rounded, - NOW() AS time + CURRENT_TIMESTAMP AS time FROM employees diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__date__date-functions__3.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__date__date-functions__3.snap new file mode 100644 index 000000000000..252c12534943 --- /dev/null +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__date__date-functions__3.snap @@ -0,0 +1,10 @@ +--- +source: web/book/tests/documentation/book.rs +expression: "from test_tables\nfilter test_time < date.now\n" +--- +SELECT + * +FROM + test_tables +WHERE + test_time < CURRENT_TIMESTAMP