diff --git a/prqlc/bindings/prqlc-python/src/lib.rs b/prqlc/bindings/prqlc-python/src/lib.rs index 68cefaf2e5f7..cdd4a4390045 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":121,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":122,"target_name":null}}],"inputs":[{"id":119,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":119,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":124},{"id":121,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[119],"parent":123},{"id":122,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[119],"parent":123},{"id":123,"kind":"Tuple","span":"1:16-31","children":[121,122],"parent":124},{"id":124,"kind":"TransformCall: Select","span":"1:9-31","children":[119,123]}],"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":122,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":123,"target_name":null}}],"inputs":[{"id":120,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":120,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":125},{"id":122,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[120],"parent":124},{"id":123,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[120],"parent":124},{"id":124,"kind":"Tuple","span":"1:16-31","children":[122,123],"parent":125},{"id":125,"kind":"TransformCall: Select","span":"1:9-31","children":[120,124]}],"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":121,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":122,"target_name":null}}],"inputs":[{"id":119,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":119,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":124},{"id":121,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[119],"parent":123},{"id":122,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[119],"parent":123},{"id":123,"kind":"Tuple","span":"1:16-31","children":[121,122],"parent":124},{"id":124,"kind":"TransformCall: Select","span":"1:9-31","children":[119,123]}],"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":122,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":123,"target_name":null}}],"inputs":[{"id":120,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":120,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":125},{"id":122,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[120],"parent":124},{"id":123,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[120],"parent":124},{"id":124,"kind":"Tuple","span":"1:16-31","children":[122,123],"parent":125},{"id":125,"kind":"TransformCall: Select","span":"1:9-31","children":[120,124]}],"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 d7bd71a656f7..586fe323d9df 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: 121 + target_id: 122 target_name: null - !Single name: - tracks - album - target_id: 122 + target_id: 123 target_name: null inputs: - - id: 119 + - id: 120 name: tracks table: - default_db - tracks nodes: - - id: 119 + - id: 120 kind: Ident span: 1:0-11 ident: !Ident - default_db - tracks - parent: 124 - - id: 121 + parent: 125 + - id: 122 kind: Ident span: 1:22-28 ident: !Ident @@ -464,9 +464,9 @@ fn debug() { - tracks - artist targets: - - 119 - parent: 123 - - id: 122 + - 120 + parent: 124 + - id: 123 kind: Ident span: 1:30-35 ident: !Ident @@ -474,21 +474,21 @@ fn debug() { - tracks - album targets: - - 119 - parent: 123 - - id: 123 + - 120 + parent: 124 + - id: 124 kind: Tuple span: 1:21-36 children: - - 121 - 122 - parent: 124 - - id: 124 + - 123 + parent: 125 + - id: 125 kind: 'TransformCall: Select' span: 1:14-36 children: - - 119 - - 123 + - 120 + - 124 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 c28740497cac..93db84e74203 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: 135 + target_id: 136 target_name: ~ - Single: name: - employees - salary - target_id: 136 + target_id: 137 target_name: ~ inputs: - - id: 133 + - id: 134 name: employees table: - default_db - employees - - id: 122 + - id: 123 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 da706326fd12..5de9898e5b49 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 @@ -1,22 +1,21 @@ --- source: prqlc/prqlc/src/semantic/resolver/mod.rs -assertion_line: 190 expression: "resolve_lineage(r#\"\n from table_1\n join customers (==customer_no)\n \"#).unwrap()" --- columns: - All: - input_id: 120 + input_id: 121 except: [] - All: - input_id: 117 + input_id: 118 except: [] inputs: - - id: 120 + - id: 121 name: table_1 table: - default_db - table_1 - - id: 117 + - id: 118 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 bd49287948b0..929e43c35a15 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 @@ -1,6 +1,5 @@ --- source: prqlc/prqlc/src/semantic/resolver/mod.rs -assertion_line: 198 expression: "resolve_lineage(r#\"\n from e = employees\n join salaries (==emp_no)\n group {e.emp_no, e.gender} (\n aggregate {\n emp_salary = average salaries.salary\n }\n )\n \"#).unwrap()" --- columns: @@ -8,26 +7,26 @@ columns: name: - e - emp_no - target_id: 130 + target_id: 131 target_name: ~ - Single: name: - e - gender - target_id: 131 + target_id: 132 target_name: ~ - Single: name: - emp_salary - target_id: 149 + target_id: 150 target_name: ~ inputs: - - id: 123 + - id: 124 name: e table: - default_db - employees - - id: 120 + - id: 121 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 6ad23c78ab24..cfe5c694e2fd 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: 124 + target_id: 125 target_name: ~ - Single: name: - orders - gross - target_id: 125 + target_id: 126 target_name: ~ - Single: name: - orders - tax - target_id: 126 + target_id: 127 target_name: ~ - Single: name: ~ - target_id: 127 + target_id: 128 target_name: ~ inputs: - - id: 122 + - id: 123 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 761566bea47a..681f77c24828 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: 119 + input_id: 120 except: [] inputs: - - id: 119 + - id: 120 name: c_invoice table: - default_db @@ -94,14 +94,14 @@ lineage: name: - c_invoice - issued_at - target_id: 121 + target_id: 122 target_name: ~ - Single: name: ~ - target_id: 137 + target_id: 138 target_name: ~ inputs: - - id: 119 + - id: 120 name: c_invoice table: - default_db diff --git a/prqlc/prqlc/src/semantic/std.prql b/prqlc/prqlc/src/semantic/std.prql index 67e2bed2308f..67e91db28753 100644 --- a/prqlc/prqlc/src/semantic/std.prql +++ b/prqlc/prqlc/src/semantic/std.prql @@ -231,6 +231,7 @@ module date { let to_text = format column -> internal std.date.to_text let diff = `noresolve.unit` start end -> internal std.date.diff let trunc = unit column -> internal std.date.trunc + let to_start_of_interval = amount `noresolve.unit` column -> internal std.date.to_start_of_interval } ## File-reading functions, primarily for DuckDB diff --git a/prqlc/prqlc/src/sql/std.sql.prql b/prqlc/prqlc/src/sql/std.sql.prql index e11e2e90622d..a34aa8e6484c 100644 --- a/prqlc/prqlc/src/sql/std.sql.prql +++ b/prqlc/prqlc/src/sql/std.sql.prql @@ -142,6 +142,7 @@ module date { # BigQuery: https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_trunc # Snowflake: https://docs.snowflake.com/en/sql-reference/functions/date_trunc let trunc = unit column -> s"DATE_TRUNC({unit:0}, {column:0})" + let to_start_of_interval = amount unit column -> null } # Source-reading functions, primarily for DuckDB @@ -229,6 +230,7 @@ module bigquery { 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 to_start_of_interval = amount unit column -> s"TIMESTAMP_BUCKET(CAST({column:0} AS TIMESTAMP), INTERVAL {amount:0} {unit:0})" } let regex_search = text pattern -> s"REGEXP_CONTAINS({text:0}, {pattern:0})" @@ -250,6 +252,8 @@ module clickhouse { let diff = unit start end -> s"dateDiff('{unit:0}', {start:0}, {end:0})" # Clickhouse uses now() for current timestamp let now = -> s"now()" + # https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions#toStartOfInterval + let to_start_of_interval = amount unit column -> s"toStartOfInterval({column:0}, INTERVAL {amount:0} {unit:0})" } let regex_search = text pattern -> s"match({text:0}, {pattern:0})" @@ -278,6 +282,7 @@ module duckdb { let to_text = format column -> s"strftime({column:0}, {format:0})" # https://duckdb.org/docs/sql/functions/date let diff = unit start end -> s"datediff('{unit:0}', {start:0}, {end:0})" + let to_start_of_interval = amount unit column -> s"time_bucket(INTERVAL '{amount:0} {unit:0}', {column:0})" } let regex_search = text pattern -> s"REGEXP_MATCHES({text:0}, {pattern:0})" @@ -309,6 +314,7 @@ module mssql { module date { # https://learn.microsoft.com/en-us/sql/t-sql/functions/format-transact-sql let to_text = format column -> s"FORMAT({column:0}, {format:0})" + let to_start_of_interval = amount unit column -> null } let regex_search = text pattern -> null @@ -334,6 +340,7 @@ module mysql { let now = -> s"NOW()" # https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_date-trunc let trunc = unit column -> s"DATE_TRUNC({unit:0}, {column:0})" + let to_start_of_interval = amount unit column -> null } # 'c' for case-sensitive @@ -366,6 +373,7 @@ module postgres { let to_text = format column -> s"TO_CHAR({column:0}, {format:0})" # PostgreSQL has no built-in DATEDIFF equivalent let diff = unit start end -> null + let to_start_of_interval = amount unit column -> s"date_bin('{amount:0} {unit:0}', {column:0}, TIMESTAMP '1970-01-01 00:00:00')" } @{binding_strength=9} 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 53e0075e8a91..d94337309a1c 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: 125 + input_id: 126 except: [] inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -18,15 +18,15 @@ frames: - - 1:124-154 - columns: - !All - input_id: 125 + input_id: 126 except: [] - !Single name: - empty_name - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -35,42 +35,42 @@ frames: - columns: - !Single name: null - target_id: 138 + target_id: 139 target_name: null - !Single name: null - target_id: 141 + target_id: 142 target_name: null - !Single name: null - target_id: 144 + target_id: 145 target_name: null - !Single name: null - target_id: 147 + target_id: 148 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db - tracks nodes: -- id: 125 +- id: 126 kind: Ident span: 1:89-100 ident: !Ident - default_db - tracks - parent: 131 -- id: 127 + parent: 132 +- id: 128 kind: RqOperator span: 1:108-123 targets: - - 129 - 130 - parent: 131 -- id: 129 + - 131 + parent: 132 +- id: 130 kind: Ident span: 1:108-116 ident: !Ident @@ -78,26 +78,26 @@ nodes: - tracks - genre_id targets: - - 125 -- id: 130 + - 126 +- id: 131 kind: Literal span: 1:120-123 -- id: 131 +- id: 132 kind: 'TransformCall: Filter' span: 1:101-123 children: - - 125 - - 127 - parent: 137 -- id: 132 + - 126 + - 128 + parent: 138 +- id: 133 kind: RqOperator span: 1:144-154 alias: empty_name targets: - - 134 - 135 - parent: 136 -- id: 134 + - 136 + parent: 137 +- id: 135 kind: Ident span: 1:144-148 ident: !Ident @@ -105,30 +105,30 @@ nodes: - tracks - name targets: - - 125 -- id: 135 + - 126 +- id: 136 kind: Literal span: 1:152-154 -- id: 136 +- id: 137 kind: Tuple span: 1:144-154 children: - - 132 - parent: 137 -- id: 137 + - 133 + parent: 138 +- id: 138 kind: 'TransformCall: Derive' span: 1:124-154 children: - - 131 - - 136 - parent: 151 -- id: 138 + - 132 + - 137 + parent: 152 +- id: 139 kind: RqOperator span: 1:166-178 targets: - - 140 - parent: 150 -- id: 140 + - 141 + parent: 151 +- id: 141 kind: Ident span: 1:170-178 ident: !Ident @@ -136,14 +136,14 @@ nodes: - tracks - track_id targets: - - 125 -- id: 141 + - 126 +- id: 142 kind: RqOperator span: 1:180-197 targets: - - 143 - parent: 150 -- id: 143 + - 144 + parent: 151 +- id: 144 kind: Ident span: 1:193-197 ident: !Ident @@ -151,50 +151,50 @@ nodes: - tracks - name targets: - - 125 -- id: 144 + - 126 +- id: 145 kind: RqOperator span: 1:199-213 targets: - - 146 - parent: 150 -- id: 146 + - 147 + parent: 151 +- id: 147 kind: Ident span: 1:203-213 ident: !Ident - this - empty_name targets: - - 132 -- id: 147 + - 133 +- id: 148 kind: RqOperator span: 1:215-229 targets: - - 149 - parent: 150 -- id: 149 + - 150 + parent: 151 +- id: 150 kind: Ident span: 1:219-229 ident: !Ident - this - empty_name targets: - - 132 -- id: 150 + - 133 +- id: 151 kind: Tuple span: 1:165-230 children: - - 138 - - 141 - - 144 - - 147 - parent: 151 -- id: 151 + - 139 + - 142 + - 145 + - 148 + parent: 152 +- id: 152 kind: 'TransformCall: Aggregate' span: 1:155-230 children: - - 137 - - 150 + - 138 + - 151 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 9eb962b1f2e3..e01d4b192e04 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: 149 + target_id: 150 target_name: null - !Single name: - invoices - invoice_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - invoices - billing_country - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 147 + - id: 148 name: invoices table: - default_db @@ -36,22 +36,22 @@ frames: name: - invoices - customer_id - target_id: 149 + target_id: 150 target_name: null - !Single name: - invoices - invoice_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - invoices - billing_country - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 147 + - id: 148 name: invoices table: - default_db @@ -62,22 +62,22 @@ frames: name: - invoices - customer_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - invoices - invoice_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - invoices - billing_country - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 + - id: 129 name: invoices table: - default_db @@ -88,22 +88,22 @@ frames: name: - invoices - customer_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - invoices - invoice_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - invoices - billing_country - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 + - id: 129 name: invoices table: - default_db @@ -114,27 +114,27 @@ frames: name: - invoices - customer_id - target_id: 149 + target_id: 150 target_name: null - !Single name: - invoices - invoice_id - target_id: 150 + target_id: 151 target_name: null - !Single name: - invoices - billing_country - target_id: 151 + target_id: 152 target_name: null inputs: - - id: 147 + - id: 148 name: invoices table: - default_db - invoices - - id: 128 + - id: 129 name: invoices table: - default_db @@ -145,34 +145,34 @@ frames: name: - invoices - billing_country - target_id: 159 + target_id: 160 target_name: null - !Single name: - invoices - invoice_id - target_id: 160 + target_id: 161 target_name: null inputs: - - id: 147 + - id: 148 name: invoices table: - default_db - invoices - - id: 128 + - id: 129 name: invoices table: - default_db - invoices nodes: -- id: 128 +- id: 129 kind: Ident span: 1:89-102 ident: !Ident - default_db - invoices - parent: 134 -- id: 130 + parent: 135 +- id: 131 kind: Ident span: 1:114-125 ident: !Ident @@ -180,9 +180,9 @@ nodes: - invoices - customer_id targets: - - 128 - parent: 133 -- id: 131 + - 129 + parent: 134 +- id: 132 kind: Ident span: 1:127-137 ident: !Ident @@ -190,9 +190,9 @@ nodes: - invoices - invoice_id targets: - - 128 - parent: 133 -- id: 132 + - 129 + parent: 134 +- id: 133 kind: Ident span: 1:139-154 ident: !Ident @@ -200,49 +200,49 @@ nodes: - invoices - billing_country targets: - - 128 - parent: 133 -- id: 133 + - 129 + parent: 134 +- id: 134 kind: Tuple span: 1:112-156 children: - - 130 - 131 - 132 - parent: 134 -- id: 134 + - 133 + parent: 135 +- id: 135 kind: 'TransformCall: Select' span: 1:105-156 children: - - 128 - - 133 - parent: 138 -- id: 135 + - 129 + - 134 + parent: 139 +- id: 136 kind: Literal span: 1:164-166 alias: start - parent: 138 -- id: 136 + parent: 139 +- id: 137 kind: Literal span: 1:168-170 alias: end - parent: 138 -- id: 138 + parent: 139 +- id: 139 kind: 'TransformCall: Take' span: 1:159-170 children: - - 134 - 135 - 136 - parent: 158 -- id: 147 + - 137 + parent: 159 +- id: 148 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 153 -- id: 149 + parent: 154 +- id: 150 kind: Ident span: 1:23-34 ident: !Ident @@ -250,9 +250,9 @@ nodes: - invoices - customer_id targets: - - 147 - parent: 152 -- id: 150 + - 148 + parent: 153 +- id: 151 kind: Ident span: 1:36-46 ident: !Ident @@ -260,9 +260,9 @@ nodes: - invoices - invoice_id targets: - - 147 - parent: 152 -- id: 151 + - 148 + parent: 153 +- id: 152 kind: Ident span: 1:48-63 ident: !Ident @@ -270,49 +270,49 @@ nodes: - invoices - billing_country targets: - - 147 - parent: 152 -- id: 152 + - 148 + parent: 153 +- id: 153 kind: Tuple span: 1:21-65 children: - - 149 - 150 - 151 - parent: 153 -- id: 153 + - 152 + parent: 154 +- id: 154 kind: 'TransformCall: Select' span: 1:14-65 children: - - 147 - - 152 - parent: 157 -- id: 154 + - 148 + - 153 + parent: 158 +- id: 155 kind: Literal span: 1:71-73 alias: start - parent: 157 -- id: 155 + parent: 158 +- id: 156 kind: Literal span: 1:75-77 alias: end - parent: 157 -- id: 157 + parent: 158 +- id: 158 kind: 'TransformCall: Take' span: 1:66-77 children: - - 153 - 154 - 155 - parent: 158 -- id: 158 + - 156 + parent: 159 +- id: 159 kind: 'TransformCall: Append' span: 1:78-172 children: - - 157 - - 138 - parent: 162 -- id: 159 + - 158 + - 139 + parent: 163 +- id: 160 kind: Ident span: 1:182-197 ident: !Ident @@ -320,9 +320,9 @@ nodes: - invoices - billing_country targets: - - 151 - parent: 161 -- id: 160 + - 152 + parent: 162 +- id: 161 kind: Ident span: 1:199-209 ident: !Ident @@ -330,21 +330,21 @@ nodes: - invoices - invoice_id targets: - - 150 - parent: 161 -- id: 161 + - 151 + parent: 162 +- id: 162 kind: Tuple span: 1:180-211 children: - - 159 - 160 - parent: 162 -- id: 162 + - 161 + parent: 163 +- id: 163 kind: 'TransformCall: Select' span: 1:173-211 children: - - 158 - - 161 + - 159 + - 162 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 06482dbcb9e4..4608453ef1d2 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: 165 + input_id: 166 except: [] - !Single name: - total - target_id: 167 + target_id: 168 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db @@ -26,21 +26,21 @@ frames: name: - invoices - customer_id - target_id: 180 + target_id: 181 target_name: null - !Single name: - invoices - invoice_id - target_id: 181 + target_id: 182 target_name: null - !Single name: - total - target_id: 182 + target_id: 183 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db @@ -51,21 +51,21 @@ frames: name: - invoices - customer_id - target_id: 180 + target_id: 181 target_name: null - !Single name: - invoices - invoice_id - target_id: 181 + target_id: 182 target_name: null - !Single name: - total - target_id: 182 + target_id: 183 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db @@ -73,15 +73,15 @@ frames: - - 1:156-235 - columns: - !All - input_id: 131 + input_id: 132 except: [] - !Single name: - unit_price - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 131 + - id: 132 name: invoice_items table: - default_db @@ -92,21 +92,21 @@ frames: name: - invoice_items - invoice_line_id - target_id: 146 + target_id: 147 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 147 + target_id: 148 target_name: null - !Single name: - unit_price - target_id: 148 + target_id: 149 target_name: null inputs: - - id: 131 + - id: 132 name: invoice_items table: - default_db @@ -117,21 +117,21 @@ frames: name: - invoice_items - invoice_line_id - target_id: 146 + target_id: 147 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 147 + target_id: 148 target_name: null - !Single name: - unit_price - target_id: 148 + target_id: 149 target_name: null inputs: - - id: 131 + - id: 132 name: invoice_items table: - default_db @@ -142,26 +142,26 @@ frames: name: - invoices - customer_id - target_id: 180 + target_id: 181 target_name: null - !Single name: - invoices - invoice_id - target_id: 181 + target_id: 182 target_name: null - !Single name: - total - target_id: 182 + target_id: 183 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db - invoices - - id: 131 + - id: 132 name: invoice_items table: - default_db @@ -171,49 +171,49 @@ frames: - !Single name: - a - target_id: 189 + target_id: 190 target_name: null - !Single name: - b - target_id: 193 + target_id: 194 target_name: null inputs: - - id: 165 + - id: 166 name: invoices table: - default_db - invoices - - id: 131 + - id: 132 name: invoice_items table: - default_db - invoice_items nodes: -- id: 131 +- id: 132 kind: Ident span: 1:135-153 ident: !Ident - default_db - invoice_items - parent: 145 -- id: 133 + parent: 146 +- id: 134 kind: Case span: 1:176-235 alias: unit_price targets: - - 134 - - 138 - - 142 + - 135 + - 139 - 143 - parent: 144 -- id: 134 + - 144 + parent: 145 +- id: 135 kind: RqOperator span: 1:182-196 targets: - - 136 - 137 -- id: 136 + - 138 +- id: 137 kind: Ident span: 1:182-192 ident: !Ident @@ -221,17 +221,17 @@ nodes: - invoice_items - unit_price targets: - - 131 -- id: 137 + - 132 +- id: 138 kind: Literal span: 1:195-196 -- id: 138 +- id: 139 kind: RqOperator span: 1:200-214 targets: - - 140 - 141 -- id: 140 + - 142 +- id: 141 kind: Ident span: 1:200-210 ident: !Ident @@ -239,14 +239,14 @@ nodes: - invoice_items - unit_price targets: - - 131 -- id: 141 + - 132 +- id: 142 kind: Literal span: 1:213-214 -- id: 142 +- id: 143 kind: Literal span: 1:216-220 -- id: 143 +- id: 144 kind: Ident span: 1:224-234 ident: !Ident @@ -254,21 +254,21 @@ nodes: - invoice_items - unit_price targets: - - 131 -- id: 144 + - 132 +- id: 145 kind: Tuple span: 1:176-235 children: - - 133 - parent: 145 -- id: 145 + - 134 + parent: 146 +- id: 146 kind: 'TransformCall: Derive' span: 1:156-235 children: - - 131 - - 144 - parent: 150 -- id: 146 + - 132 + - 145 + parent: 151 +- id: 147 kind: Ident span: 1:247-262 ident: !Ident @@ -276,9 +276,9 @@ nodes: - invoice_items - invoice_line_id targets: - - 131 - parent: 149 -- id: 147 + - 132 + parent: 150 +- id: 148 kind: Ident span: 1:264-274 ident: !Ident @@ -286,66 +286,66 @@ nodes: - invoice_items - invoice_id targets: - - 131 - parent: 149 -- id: 148 + - 132 + parent: 150 +- id: 149 kind: Ident span: 1:276-286 ident: !Ident - this - unit_price targets: - - 133 - parent: 149 -- id: 149 + - 134 + parent: 150 +- id: 150 kind: Tuple span: 1:245-288 children: - - 146 - 147 - 148 - parent: 150 -- id: 150 + - 149 + parent: 151 +- id: 151 kind: 'TransformCall: Select' span: 1:238-288 children: - - 145 - - 149 - parent: 152 -- id: 152 + - 146 + - 150 + parent: 153 +- id: 153 kind: 'TransformCall: Take' span: 1:291-297 children: - - 150 - - 153 - parent: 188 -- id: 153 + - 151 + - 154 + parent: 189 +- id: 154 kind: Literal - parent: 152 -- id: 165 + parent: 153 +- id: 166 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 179 -- id: 167 + parent: 180 +- id: 168 kind: Case span: 1:29-74 alias: total targets: - - 168 - - 172 - - 176 + - 169 + - 173 - 177 - parent: 178 -- id: 168 + - 178 + parent: 179 +- id: 169 kind: RqOperator span: 1:35-45 targets: - - 170 - 171 -- id: 170 + - 172 +- id: 171 kind: Ident span: 1:35-40 ident: !Ident @@ -353,17 +353,17 @@ nodes: - invoices - total targets: - - 165 -- id: 171 + - 166 +- id: 172 kind: Literal span: 1:43-45 -- id: 172 +- id: 173 kind: RqOperator span: 1:49-58 targets: - - 174 - 175 -- id: 174 + - 176 +- id: 175 kind: Ident span: 1:49-54 ident: !Ident @@ -371,14 +371,14 @@ nodes: - invoices - total targets: - - 165 -- id: 175 + - 166 +- id: 176 kind: Literal span: 1:57-58 -- id: 176 +- id: 177 kind: Literal span: 1:60-64 -- id: 177 +- id: 178 kind: Ident span: 1:68-73 ident: !Ident @@ -386,21 +386,21 @@ nodes: - invoices - total targets: - - 165 -- id: 178 + - 166 +- id: 179 kind: Tuple span: 1:29-74 children: - - 167 - parent: 179 -- id: 179 + - 168 + parent: 180 +- id: 180 kind: 'TransformCall: Derive' span: 1:14-74 children: - - 165 - - 178 - parent: 184 -- id: 180 + - 166 + - 179 + parent: 185 +- id: 181 kind: Ident span: 1:84-95 ident: !Ident @@ -408,9 +408,9 @@ nodes: - invoices - customer_id targets: - - 165 - parent: 183 -- id: 181 + - 166 + parent: 184 +- id: 182 kind: Ident span: 1:97-107 ident: !Ident @@ -418,58 +418,58 @@ nodes: - invoices - invoice_id targets: - - 165 - parent: 183 -- id: 182 + - 166 + parent: 184 +- id: 183 kind: Ident span: 1:109-114 ident: !Ident - this - total targets: - - 167 - parent: 183 -- id: 183 + - 168 + parent: 184 +- id: 184 kind: Tuple span: 1:82-116 children: - - 180 - 181 - 182 - parent: 184 -- id: 184 + - 183 + parent: 185 +- id: 185 kind: 'TransformCall: Select' span: 1:75-116 children: - - 179 - - 183 - parent: 186 -- id: 186 + - 180 + - 184 + parent: 187 +- id: 187 kind: 'TransformCall: Take' span: 1:117-123 children: - - 184 - - 187 - parent: 188 -- id: 187 - kind: Literal - parent: 186 + - 185 + - 188 + parent: 189 - id: 188 + kind: Literal + parent: 187 +- id: 189 kind: 'TransformCall: Append' span: 1:124-299 children: - - 186 - - 152 - parent: 201 -- id: 189 + - 187 + - 153 + parent: 202 +- id: 190 kind: RqOperator span: 1:313-328 alias: a targets: - - 191 - 192 - parent: 200 -- id: 191 + - 193 + parent: 201 +- id: 192 kind: Ident span: 1:313-324 ident: !Ident @@ -477,28 +477,28 @@ nodes: - invoices - customer_id targets: - - 180 -- id: 192 + - 181 +- id: 193 kind: Literal span: 1:327-328 -- id: 193 +- id: 194 kind: RqOperator span: 1:334-367 alias: b targets: - - 195 - 196 - parent: 200 -- id: 195 + - 197 + parent: 201 +- id: 196 kind: Literal span: 1:345-346 -- id: 196 +- id: 197 kind: RqOperator span: 1:348-366 targets: - - 198 - 199 -- id: 198 + - 200 +- id: 199 kind: Ident span: 1:348-358 ident: !Ident @@ -506,28 +506,28 @@ nodes: - invoices - invoice_id targets: - - 181 -- id: 199 + - 182 +- id: 200 kind: Ident span: 1:361-366 ident: !Ident - this - total targets: - - 182 -- id: 200 + - 183 +- id: 201 kind: Tuple span: 1:307-369 children: - - 189 - - 193 - parent: 201 -- id: 201 + - 190 + - 194 + parent: 202 +- id: 202 kind: 'TransformCall: Select' span: 1:300-369 children: - - 188 - - 200 + - 189 + - 201 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 02ea7e67bdfc..cbd9bbb050cc 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: 169 + target_id: 170 target_name: null - !Single name: - invoices - invoice_id - target_id: 170 + target_id: 171 target_name: null - !Single name: - invoices - billing_country - target_id: 171 + target_id: 172 target_name: null inputs: - - id: 167 + - id: 168 name: invoices table: - default_db @@ -36,22 +36,22 @@ frames: name: - invoices - customer_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - invoices - invoice_id - target_id: 170 + target_id: 171 target_name: null - !Single name: - invoices - billing_country - target_id: 171 + target_id: 172 target_name: null inputs: - - id: 167 + - id: 168 name: invoices table: - default_db @@ -60,22 +60,22 @@ frames: - columns: - !Single name: null - target_id: 151 + target_id: 152 target_name: null - !Single name: - employees - employee_id - target_id: 152 + target_id: 153 target_name: null - !Single name: - employees - country - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 149 + - id: 150 name: employees table: - default_db @@ -84,22 +84,22 @@ frames: - columns: - !Single name: null - target_id: 151 + target_id: 152 target_name: null - !Single name: - employees - employee_id - target_id: 152 + target_id: 153 target_name: null - !Single name: - employees - country - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 149 + - id: 150 name: employees table: - default_db @@ -110,27 +110,27 @@ frames: name: - invoices - customer_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - invoices - invoice_id - target_id: 170 + target_id: 171 target_name: null - !Single name: - invoices - billing_country - target_id: 171 + target_id: 172 target_name: null inputs: - - id: 167 + - id: 168 name: invoices table: - default_db - invoices - - id: 149 + - id: 150 name: employees table: - default_db @@ -141,20 +141,20 @@ frames: name: - invoice_items - invoice_line_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 131 + target_id: 132 target_name: null - !Single name: null - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 + - id: 129 name: invoice_items table: - default_db @@ -165,20 +165,20 @@ frames: name: - invoice_items - invoice_line_id - target_id: 130 + target_id: 131 target_name: null - !Single name: - invoice_items - invoice_id - target_id: 131 + target_id: 132 target_name: null - !Single name: null - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 + - id: 129 name: invoice_items table: - default_db @@ -189,32 +189,32 @@ frames: name: - invoices - customer_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - invoices - invoice_id - target_id: 170 + target_id: 171 target_name: null - !Single name: - invoices - billing_country - target_id: 171 + target_id: 172 target_name: null inputs: - - id: 167 + - id: 168 name: invoices table: - default_db - invoices - - id: 149 + - id: 150 name: employees table: - default_db - employees - - id: 128 + - id: 129 name: invoice_items table: - default_db @@ -225,39 +225,39 @@ frames: name: - invoices - billing_country - target_id: 179 + target_id: 180 target_name: null - !Single name: - invoices - invoice_id - target_id: 180 + target_id: 181 target_name: null inputs: - - id: 167 + - id: 168 name: invoices table: - default_db - invoices - - id: 149 + - id: 150 name: employees table: - default_db - employees - - id: 128 + - id: 129 name: invoice_items table: - default_db - invoice_items nodes: -- id: 128 +- id: 129 kind: Ident span: 1:168-186 ident: !Ident - default_db - invoice_items - parent: 134 -- id: 130 + parent: 135 +- id: 131 kind: Ident span: 1:198-213 ident: !Ident @@ -265,9 +265,9 @@ nodes: - invoice_items - invoice_line_id targets: - - 128 - parent: 133 -- id: 131 + - 129 + parent: 134 +- id: 132 kind: Ident span: 1:215-225 ident: !Ident @@ -275,45 +275,45 @@ nodes: - invoice_items - invoice_id targets: - - 128 - parent: 133 -- id: 132 + - 129 + parent: 134 +- id: 133 kind: Literal span: 1:227-231 - parent: 133 -- id: 133 + parent: 134 +- id: 134 kind: Tuple span: 1:196-233 children: - - 130 - 131 - 132 - parent: 134 -- id: 134 + - 133 + parent: 135 +- id: 135 kind: 'TransformCall: Select' span: 1:189-233 children: - - 128 - - 133 - parent: 136 -- id: 136 + - 129 + - 134 + parent: 137 +- id: 137 kind: 'TransformCall: Take' span: 1:236-242 children: - - 134 - - 137 - parent: 178 -- id: 137 + - 135 + - 138 + parent: 179 +- id: 138 kind: Literal - parent: 136 -- id: 149 + parent: 137 +- id: 150 kind: Ident span: 1:84-98 ident: !Ident - default_db - employees - parent: 155 -- id: 151 + parent: 156 +- id: 152 kind: Ident span: 1:110-121 ident: !Ident @@ -321,9 +321,9 @@ nodes: - employees - employee_id targets: - - 149 - parent: 154 -- id: 152 + - 150 + parent: 155 +- id: 153 kind: Ident span: 1:123-134 ident: !Ident @@ -331,9 +331,9 @@ nodes: - employees - employee_id targets: - - 149 - parent: 154 -- id: 153 + - 150 + parent: 155 +- id: 154 kind: Ident span: 1:136-143 ident: !Ident @@ -341,41 +341,41 @@ nodes: - employees - country targets: - - 149 - parent: 154 -- id: 154 + - 150 + parent: 155 +- id: 155 kind: Tuple span: 1:108-145 children: - - 151 - 152 - 153 - parent: 155 -- id: 155 + - 154 + parent: 156 +- id: 156 kind: 'TransformCall: Select' span: 1:101-145 children: - - 149 - - 154 - parent: 157 -- id: 157 + - 150 + - 155 + parent: 158 +- id: 158 kind: 'TransformCall: Take' span: 1:148-154 children: - - 155 - - 158 - parent: 177 -- id: 158 + - 156 + - 159 + parent: 178 +- id: 159 kind: Literal - parent: 157 -- id: 167 + parent: 158 +- id: 168 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 173 -- id: 169 + parent: 174 +- id: 170 kind: Ident span: 1:23-34 ident: !Ident @@ -383,9 +383,9 @@ nodes: - invoices - customer_id targets: - - 167 - parent: 172 -- id: 170 + - 168 + parent: 173 +- id: 171 kind: Ident span: 1:36-46 ident: !Ident @@ -393,9 +393,9 @@ nodes: - invoices - invoice_id targets: - - 167 - parent: 172 -- id: 171 + - 168 + parent: 173 +- id: 172 kind: Ident span: 1:48-63 ident: !Ident @@ -403,48 +403,48 @@ nodes: - invoices - billing_country targets: - - 167 - parent: 172 -- id: 172 + - 168 + parent: 173 +- id: 173 kind: Tuple span: 1:21-65 children: - - 169 - 170 - 171 - parent: 173 -- id: 173 + - 172 + parent: 174 +- id: 174 kind: 'TransformCall: Select' span: 1:14-65 children: - - 167 - - 172 - parent: 175 -- id: 175 + - 168 + - 173 + parent: 176 +- id: 176 kind: 'TransformCall: Take' span: 1:66-72 children: - - 173 - - 176 - parent: 177 -- id: 176 - kind: Literal - parent: 175 + - 174 + - 177 + parent: 178 - id: 177 + kind: Literal + parent: 176 +- id: 178 kind: 'TransformCall: Append' span: 1:73-156 children: - - 175 - - 157 - parent: 178 -- id: 178 + - 176 + - 158 + parent: 179 +- id: 179 kind: 'TransformCall: Append' span: 1:157-244 children: - - 177 - - 136 - parent: 182 -- id: 179 + - 178 + - 137 + parent: 183 +- id: 180 kind: Ident span: 1:254-269 ident: !Ident @@ -452,9 +452,9 @@ nodes: - invoices - billing_country targets: - - 171 - parent: 181 -- id: 180 + - 172 + parent: 182 +- id: 181 kind: Ident span: 1:271-281 ident: !Ident @@ -462,21 +462,21 @@ nodes: - invoices - invoice_id targets: - - 170 - parent: 181 -- id: 181 + - 171 + parent: 182 +- id: 182 kind: Tuple span: 1:252-283 children: - - 179 - 180 - parent: 182 -- id: 182 + - 181 + parent: 183 +- id: 183 kind: 'TransformCall: Select' span: 1:245-283 children: - - 178 - - 181 + - 179 + - 182 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 25e739a963f9..185d9db559de 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: 144 + target_id: 145 target_name: null - !Single name: - name - target_id: 145 + target_id: 146 target_name: null inputs: - - id: 142 + - id: 143 name: invoices table: - default_db @@ -27,15 +27,15 @@ frames: - !Single name: - an_id - target_id: 144 + target_id: 145 target_name: null - !Single name: - name - target_id: 145 + target_id: 146 target_name: null inputs: - - id: 142 + - id: 143 name: invoices table: - default_db @@ -45,15 +45,15 @@ frames: - !Single name: - an_id - target_id: 127 + target_id: 128 target_name: null - !Single name: - name - target_id: 128 + target_id: 129 target_name: null inputs: - - id: 125 + - id: 126 name: employees table: - default_db @@ -63,15 +63,15 @@ frames: - !Single name: - an_id - target_id: 127 + target_id: 128 target_name: null - !Single name: - name - target_id: 128 + target_id: 129 target_name: null inputs: - - id: 125 + - id: 126 name: employees table: - default_db @@ -81,38 +81,38 @@ frames: - !Single name: - an_id - target_id: 144 + target_id: 145 target_name: null - !Single name: - name - target_id: 145 + target_id: 146 target_name: null inputs: - - id: 142 + - id: 143 name: invoices table: - default_db - invoices - - id: 125 + - id: 126 name: employees table: - default_db - employees nodes: -- id: 125 +- id: 126 kind: Ident span: 1:73-87 ident: !Ident - default_db - employees - parent: 130 -- id: 127 + parent: 131 +- id: 128 kind: Literal span: 1:106-110 alias: an_id - parent: 129 -- id: 128 + parent: 130 +- id: 129 kind: Ident span: 1:119-129 alias: name @@ -121,40 +121,40 @@ nodes: - employees - first_name targets: - - 125 - parent: 129 -- id: 129 + - 126 + parent: 130 +- id: 130 kind: Tuple span: 1:97-130 children: - - 127 - 128 - parent: 130 -- id: 130 + - 129 + parent: 131 +- id: 131 kind: 'TransformCall: Select' span: 1:90-130 children: - - 125 - - 129 - parent: 132 -- id: 132 + - 126 + - 130 + parent: 133 +- id: 133 kind: 'TransformCall: Take' span: 1:133-139 children: - - 130 - - 133 - parent: 151 -- id: 133 + - 131 + - 134 + parent: 152 +- id: 134 kind: Literal - parent: 132 -- id: 142 + parent: 133 +- id: 143 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 147 -- id: 144 + parent: 148 +- id: 145 kind: Ident span: 1:30-40 alias: an_id @@ -163,43 +163,43 @@ nodes: - invoices - invoice_id targets: - - 142 - parent: 146 -- id: 145 + - 143 + parent: 147 +- id: 146 kind: Literal span: 1:49-53 alias: name - parent: 146 -- id: 146 + parent: 147 +- id: 147 kind: Tuple span: 1:21-54 children: - - 144 - 145 - parent: 147 -- id: 147 + - 146 + parent: 148 +- id: 148 kind: 'TransformCall: Select' span: 1:14-54 children: - - 142 - - 146 - parent: 149 -- id: 149 + - 143 + - 147 + parent: 150 +- id: 150 kind: 'TransformCall: Take' span: 1:55-61 children: - - 147 - - 150 - parent: 151 -- id: 150 - kind: Literal - parent: 149 + - 148 + - 151 + parent: 152 - id: 151 + kind: Literal + parent: 150 +- id: 152 kind: 'TransformCall: Append' span: 1:62-141 children: - - 149 - - 132 + - 150 + - 133 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 886ac7799396..00ba04a74e58 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: 141 + target_id: 142 target_name: null - !Single name: - invoices - billing_country - target_id: 142 + target_id: 143 target_name: null inputs: - - id: 139 + - id: 140 name: invoices table: - default_db @@ -29,16 +29,16 @@ frames: - !Single name: - invoice_id - target_id: 127 + target_id: 128 target_name: null - !Single name: - invoices - billing_country - target_id: 131 + target_id: 132 target_name: null inputs: - - id: 125 + - id: 126 name: invoices table: - default_db @@ -49,21 +49,21 @@ frames: name: - invoices - invoice_id - target_id: 141 + target_id: 142 target_name: null - !Single name: - invoices - billing_country - target_id: 142 + target_id: 143 target_name: null inputs: - - id: 139 + - id: 140 name: invoices table: - default_db - invoices - - id: 125 + - id: 126 name: invoices table: - default_db @@ -74,42 +74,42 @@ frames: name: - invoices - invoice_id - target_id: 141 + target_id: 142 target_name: null - !Single name: - invoices - billing_country - target_id: 142 + target_id: 143 target_name: null inputs: - - id: 139 + - id: 140 name: invoices table: - default_db - invoices - - id: 125 + - id: 126 name: invoices table: - default_db - invoices nodes: -- id: 125 +- id: 126 kind: Ident span: 1:64-77 ident: !Ident - default_db - invoices - parent: 133 -- id: 127 + parent: 134 +- id: 128 kind: RqOperator span: 1:102-120 alias: invoice_id targets: - - 129 - 130 - parent: 132 -- id: 129 + - 131 + parent: 133 +- id: 130 kind: Ident span: 1:102-114 ident: !Ident @@ -117,11 +117,11 @@ nodes: - invoices - invoice_id targets: - - 125 -- id: 130 + - 126 +- id: 131 kind: Literal span: 1:117-120 -- id: 131 +- id: 132 kind: Ident span: 1:122-137 ident: !Ident @@ -129,30 +129,30 @@ nodes: - invoices - billing_country targets: - - 125 - parent: 132 -- id: 132 + - 126 + parent: 133 +- id: 133 kind: Tuple span: 1:87-139 children: - - 127 - - 131 - parent: 133 -- id: 133 + - 128 + - 132 + parent: 134 +- id: 134 kind: 'TransformCall: Select' span: 1:80-139 children: - - 125 - - 132 - parent: 145 -- id: 139 + - 126 + - 133 + parent: 146 +- id: 140 kind: Ident span: 1:0-13 ident: !Ident - default_db - invoices - parent: 144 -- id: 141 + parent: 145 +- id: 142 kind: Ident span: 1:23-33 ident: !Ident @@ -160,9 +160,9 @@ nodes: - invoices - invoice_id targets: - - 139 - parent: 143 -- id: 142 + - 140 + parent: 144 +- id: 143 kind: Ident span: 1:35-50 ident: !Ident @@ -170,40 +170,40 @@ nodes: - invoices - billing_country targets: - - 139 - parent: 143 -- id: 143 + - 140 + parent: 144 +- id: 144 kind: Tuple span: 1:21-52 children: - - 141 - 142 - parent: 144 -- id: 144 - kind: 'TransformCall: Select' - span: 1:14-52 - children: - - 139 - 143 parent: 145 - id: 145 - kind: 'TransformCall: Append' - span: 1:53-141 + kind: 'TransformCall: Select' + span: 1:14-52 children: + - 140 - 144 - - 133 - parent: 151 + parent: 146 - id: 146 + kind: 'TransformCall: Append' + span: 1:53-141 + children: + - 145 + - 134 + parent: 152 +- id: 147 kind: RqOperator span: 1:168-189 targets: - - 149 - 150 - parent: 151 -- id: 149 + - 151 + parent: 152 +- id: 150 kind: Literal span: 1:185-188 -- id: 150 +- id: 151 kind: Ident span: 1:150-165 ident: !Ident @@ -211,13 +211,13 @@ nodes: - invoices - billing_country targets: - - 142 -- id: 151 + - 143 +- id: 152 kind: 'TransformCall: Filter' span: 1:142-190 children: - - 145 - 146 + - 147 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 fd81e63ff734..9302cb5148e4 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_122 + - _literal_123 - id - target_id: 164 + target_id: 165 target_name: null - !Single name: null - target_id: 165 + target_id: 166 target_name: null - !Single name: null - target_id: 169 + target_id: 170 target_name: null - !Single name: null - target_id: 173 + target_id: 174 target_name: null - !Single name: null - target_id: 177 + target_id: 178 target_name: null - !Single name: - q_ii - target_id: 181 + target_id: 182 target_name: null - !Single name: - q_if - target_id: 185 + target_id: 186 target_name: null - !Single name: - q_fi - target_id: 189 + target_id: 190 target_name: null - !Single name: - q_ff - target_id: 193 + target_id: 194 target_name: null - !Single name: - r_ii - target_id: 197 + target_id: 198 target_name: null - !Single name: - r_if - target_id: 201 + target_id: 202 target_name: null - !Single name: - r_fi - target_id: 205 + target_id: 206 target_name: null - !Single name: - r_ff - target_id: 209 + target_id: 210 target_name: null - !Single name: null - target_id: 213 + target_id: 214 target_name: null - !Single name: null - target_id: 224 + target_id: 225 target_name: null - !Single name: null - target_id: 235 + target_id: 236 target_name: null - !Single name: null - target_id: 246 + target_id: 247 target_name: null inputs: - - id: 122 - name: _literal_122 + - id: 123 + name: _literal_123 table: - default_db - - _literal_122 + - _literal_123 - - 1:825-832 - columns: - !Single name: - - _literal_122 + - _literal_123 - id - target_id: 164 + target_id: 165 target_name: null - !Single name: null - target_id: 165 + target_id: 166 target_name: null - !Single name: null - target_id: 169 + target_id: 170 target_name: null - !Single name: null - target_id: 173 + target_id: 174 target_name: null - !Single name: null - target_id: 177 + target_id: 178 target_name: null - !Single name: - q_ii - target_id: 181 + target_id: 182 target_name: null - !Single name: - q_if - target_id: 185 + target_id: 186 target_name: null - !Single name: - q_fi - target_id: 189 + target_id: 190 target_name: null - !Single name: - q_ff - target_id: 193 + target_id: 194 target_name: null - !Single name: - r_ii - target_id: 197 + target_id: 198 target_name: null - !Single name: - r_if - target_id: 201 + target_id: 202 target_name: null - !Single name: - r_fi - target_id: 205 + target_id: 206 target_name: null - !Single name: - r_ff - target_id: 209 + target_id: 210 target_name: null - !Single name: null - target_id: 213 + target_id: 214 target_name: null - !Single name: null - target_id: 224 + target_id: 225 target_name: null - !Single name: null - target_id: 235 + target_id: 236 target_name: null - !Single name: null - target_id: 246 + target_id: 247 target_name: null inputs: - - id: 122 - name: _literal_122 + - id: 123 + name: _literal_123 table: - default_db - - _literal_122 + - _literal_123 nodes: -- id: 122 +- id: 123 kind: Array span: 1:13-317 children: - - 123 - - 129 - - 139 - - 149 - parent: 258 -- id: 123 + - 124 + - 130 + - 140 + - 150 + parent: 259 +- id: 124 kind: Tuple span: 1:24-92 children: - - 124 - 125 - 126 - 127 - 128 - parent: 122 -- id: 124 + - 129 + parent: 123 +- id: 125 kind: Literal span: 1:31-32 alias: id - parent: 123 -- id: 125 + parent: 124 +- id: 126 kind: Literal span: 1:43-45 alias: x_int - parent: 123 -- id: 126 + parent: 124 +- id: 127 kind: Literal span: 1:58-62 alias: x_float - parent: 123 -- id: 127 + parent: 124 +- id: 128 kind: Literal span: 1:73-74 alias: k_int - parent: 123 -- id: 128 + parent: 124 +- id: 129 kind: Literal span: 1:87-90 alias: k_float - parent: 123 -- id: 129 + parent: 124 +- id: 130 kind: Tuple span: 1:98-166 children: - - 130 - 131 - - 134 - - 137 + - 132 + - 135 - 138 - parent: 122 -- id: 130 + - 139 + parent: 123 +- id: 131 kind: Literal span: 1:105-106 alias: id - parent: 129 -- id: 131 + parent: 130 +- id: 132 kind: Literal span: 1:116-119 alias: x_int - parent: 129 -- id: 134 + parent: 130 +- id: 135 kind: Literal span: 1:131-136 alias: x_float - parent: 129 -- id: 137 + parent: 130 +- id: 138 kind: Literal span: 1:147-148 alias: k_int - parent: 129 -- id: 138 + parent: 130 +- id: 139 kind: Literal span: 1:161-164 alias: k_float - parent: 129 -- id: 139 + parent: 130 +- id: 140 kind: Tuple span: 1:172-240 children: - - 140 - 141 - 142 - 143 - - 146 - parent: 122 -- id: 140 + - 144 + - 147 + parent: 123 +- id: 141 kind: Literal span: 1:179-180 alias: id - parent: 139 -- id: 141 + parent: 140 +- id: 142 kind: Literal span: 1:191-193 alias: x_int - parent: 139 -- id: 142 + parent: 140 +- id: 143 kind: Literal span: 1:206-210 alias: x_float - parent: 139 -- id: 143 + parent: 140 +- id: 144 kind: Literal span: 1:220-222 alias: k_int - parent: 139 -- id: 146 + parent: 140 +- id: 147 kind: Literal span: 1:234-238 alias: k_float - parent: 139 -- id: 149 + parent: 140 +- id: 150 kind: Tuple span: 1:246-314 children: - - 150 - 151 - - 154 - - 157 - - 160 - parent: 122 -- id: 150 + - 152 + - 155 + - 158 + - 161 + parent: 123 +- id: 151 kind: Literal span: 1:253-254 alias: id - parent: 149 -- id: 151 + parent: 150 +- id: 152 kind: Literal span: 1:264-267 alias: x_int - parent: 149 -- id: 154 + parent: 150 +- id: 155 kind: Literal span: 1:279-284 alias: x_float - parent: 149 -- id: 157 + parent: 150 +- id: 158 kind: Literal span: 1:294-296 alias: k_int - parent: 149 -- id: 160 + parent: 150 +- id: 161 kind: Literal span: 1:308-312 alias: k_float - parent: 149 -- id: 164 + parent: 150 +- id: 165 kind: Ident span: 1:331-333 ident: !Ident - this - - _literal_122 + - _literal_123 - id targets: - - 122 - parent: 257 -- id: 165 + - 123 + parent: 258 +- id: 166 kind: RqOperator span: 1:340-353 targets: - - 167 - 168 - parent: 257 -- id: 167 + - 169 + parent: 258 +- id: 168 kind: Ident span: 1:340-345 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 168 + - 123 +- id: 169 kind: Ident span: 1:348-353 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 169 + - 123 +- id: 170 kind: RqOperator span: 1:359-374 targets: - - 171 - 172 - parent: 257 -- id: 171 + - 173 + parent: 258 +- id: 172 kind: Ident span: 1:359-364 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 172 + - 123 +- id: 173 kind: Ident span: 1:367-374 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 173 + - 123 +- id: 174 kind: RqOperator span: 1:380-395 targets: - - 175 - 176 - parent: 257 -- id: 175 + - 177 + parent: 258 +- id: 176 kind: Ident span: 1:380-387 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 176 + - 123 +- id: 177 kind: Ident span: 1:390-395 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 177 + - 123 +- id: 178 kind: RqOperator span: 1:401-418 targets: - - 179 - 180 - parent: 257 -- id: 179 + - 181 + parent: 258 +- id: 180 kind: Ident span: 1:401-408 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 180 + - 123 +- id: 181 kind: Ident span: 1:411-418 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 181 + - 123 +- id: 182 kind: RqOperator span: 1:432-446 alias: q_ii targets: - - 183 - 184 - parent: 257 -- id: 183 + - 185 + parent: 258 +- id: 184 kind: Ident span: 1:432-437 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 184 + - 123 +- id: 185 kind: Ident span: 1:441-446 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 185 + - 123 +- id: 186 kind: RqOperator span: 1:459-475 alias: q_if targets: - - 187 - 188 - parent: 257 -- id: 187 + - 189 + parent: 258 +- id: 188 kind: Ident span: 1:459-464 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 188 + - 123 +- id: 189 kind: Ident span: 1:468-475 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 189 + - 123 +- id: 190 kind: RqOperator span: 1:488-504 alias: q_fi targets: - - 191 - 192 - parent: 257 -- id: 191 + - 193 + parent: 258 +- id: 192 kind: Ident span: 1:488-495 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 192 + - 123 +- id: 193 kind: Ident span: 1:499-504 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 193 + - 123 +- id: 194 kind: RqOperator span: 1:517-535 alias: q_ff targets: - - 195 - 196 - parent: 257 -- id: 195 + - 197 + parent: 258 +- id: 196 kind: Ident span: 1:517-524 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 196 + - 123 +- id: 197 kind: Ident span: 1:528-535 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 197 + - 123 +- id: 198 kind: RqOperator span: 1:549-562 alias: r_ii targets: - - 199 - 200 - parent: 257 -- id: 199 + - 201 + parent: 258 +- id: 200 kind: Ident span: 1:549-554 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 200 + - 123 +- id: 201 kind: Ident span: 1:557-562 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 201 + - 123 +- id: 202 kind: RqOperator span: 1:575-590 alias: r_if targets: - - 203 - 204 - parent: 257 -- id: 203 + - 205 + parent: 258 +- id: 204 kind: Ident span: 1:575-580 ident: !Ident - this - - _literal_122 + - _literal_123 - x_int targets: - - 122 -- id: 204 + - 123 +- id: 205 kind: Ident span: 1:583-590 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 205 + - 123 +- id: 206 kind: RqOperator span: 1:603-618 alias: r_fi targets: - - 207 - 208 - parent: 257 -- id: 207 + - 209 + parent: 258 +- id: 208 kind: Ident span: 1:603-610 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 208 + - 123 +- id: 209 kind: Ident span: 1:613-618 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 209 + - 123 +- id: 210 kind: RqOperator span: 1:631-648 alias: r_ff targets: - - 211 - 212 - parent: 257 -- id: 211 + - 213 + parent: 258 +- id: 212 kind: Ident span: 1:631-638 ident: !Ident - this - - _literal_122 + - _literal_123 - x_float targets: - - 122 -- id: 212 + - 123 +- id: 213 kind: Ident span: 1:641-648 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 213 + - 123 +- id: 214 kind: RqOperator span: 1:678-690 targets: - - 216 - 217 - parent: 257 -- id: 216 + - 218 + parent: 258 +- id: 217 kind: Literal span: 1:689-690 -- id: 217 +- id: 218 kind: RqOperator span: 1:656-675 targets: - - 219 - - 223 -- id: 219 + - 220 + - 224 +- id: 220 kind: RqOperator span: 1:656-668 targets: - - 221 - 222 -- id: 221 + - 223 +- id: 222 kind: Ident span: 1:656-660 ident: !Ident - this - q_ii targets: - - 181 -- id: 222 + - 182 +- id: 223 kind: Ident span: 1:663-668 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 223 + - 123 +- id: 224 kind: Ident span: 1:671-675 ident: !Ident - this - r_ii targets: - - 197 -- id: 224 + - 198 +- id: 225 kind: RqOperator span: 1:722-734 targets: - - 227 - 228 - parent: 257 -- id: 227 + - 229 + parent: 258 +- id: 228 kind: Literal span: 1:733-734 -- id: 228 +- id: 229 kind: RqOperator span: 1:698-719 targets: - - 230 - - 234 -- id: 230 + - 231 + - 235 +- id: 231 kind: RqOperator span: 1:698-712 targets: - - 232 - 233 -- id: 232 + - 234 +- id: 233 kind: Ident span: 1:698-702 ident: !Ident - this - q_if targets: - - 185 -- id: 233 + - 186 +- id: 234 kind: Ident span: 1:705-712 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 234 + - 123 +- id: 235 kind: Ident span: 1:715-719 ident: !Ident - this - r_if targets: - - 201 -- id: 235 + - 202 +- id: 236 kind: RqOperator span: 1:764-776 targets: - - 238 - 239 - parent: 257 -- id: 238 + - 240 + parent: 258 +- id: 239 kind: Literal span: 1:775-776 -- id: 239 +- id: 240 kind: RqOperator span: 1:742-761 targets: - - 241 - - 245 -- id: 241 + - 242 + - 246 +- id: 242 kind: RqOperator span: 1:742-754 targets: - - 243 - 244 -- id: 243 + - 245 +- id: 244 kind: Ident span: 1:742-746 ident: !Ident - this - q_fi targets: - - 189 -- id: 244 + - 190 +- id: 245 kind: Ident span: 1:749-754 ident: !Ident - this - - _literal_122 + - _literal_123 - k_int targets: - - 122 -- id: 245 + - 123 +- id: 246 kind: Ident span: 1:757-761 ident: !Ident - this - r_fi targets: - - 205 -- id: 246 + - 206 +- id: 247 kind: RqOperator span: 1:808-820 targets: - - 249 - 250 - parent: 257 -- id: 249 + - 251 + parent: 258 +- id: 250 kind: Literal span: 1:819-820 -- id: 250 +- id: 251 kind: RqOperator span: 1:784-805 targets: - - 252 - - 256 -- id: 252 + - 253 + - 257 +- id: 253 kind: RqOperator span: 1:784-798 targets: - - 254 - 255 -- id: 254 + - 256 +- id: 255 kind: Ident span: 1:784-788 ident: !Ident - this - q_ff targets: - - 193 -- id: 255 + - 194 +- id: 256 kind: Ident span: 1:791-798 ident: !Ident - this - - _literal_122 + - _literal_123 - k_float targets: - - 122 -- id: 256 + - 123 +- id: 257 kind: Ident span: 1:801-805 ident: !Ident - this - r_ff targets: - - 209 -- id: 257 + - 210 +- id: 258 kind: Tuple span: 1:325-824 children: - - 164 - 165 - - 169 - - 173 - - 177 - - 181 - - 185 - - 189 - - 193 - - 197 - - 201 - - 205 - - 209 - - 213 - - 224 - - 235 - - 246 - parent: 258 -- id: 258 + - 166 + - 170 + - 174 + - 178 + - 182 + - 186 + - 190 + - 194 + - 198 + - 202 + - 206 + - 210 + - 214 + - 225 + - 236 + - 247 + parent: 259 +- id: 259 kind: 'TransformCall: Select' span: 1:318-824 children: - - 122 - - 257 - parent: 261 -- id: 259 + - 123 + - 258 + parent: 262 +- id: 260 kind: Ident span: 1:830-832 ident: !Ident - this - - _literal_122 + - _literal_123 - id targets: - - 164 - parent: 261 -- id: 261 + - 165 + parent: 262 +- id: 262 kind: 'TransformCall: Sort' span: 1:825-832 children: - - 258 - 259 + - 260 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 ce5b68312d60..f457d1fd63cd 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: 125 + input_id: 126 except: [] inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -21,15 +21,15 @@ frames: name: - tracks - name - target_id: 132 + target_id: 133 target_name: null - !Single name: - bin - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -40,28 +40,28 @@ frames: name: - tracks - name - target_id: 132 + target_id: 133 target_name: null - !Single name: - bin - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db - tracks nodes: -- id: 125 +- id: 126 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 131 -- id: 129 + parent: 132 +- id: 130 kind: Ident span: 1:32-37 ident: !Ident @@ -69,16 +69,16 @@ nodes: - tracks - bytes targets: - - 125 - parent: 131 -- id: 131 + - 126 + parent: 132 +- id: 132 kind: 'TransformCall: Sort' span: 1:25-38 children: - - 125 - - 129 - parent: 141 -- id: 132 + - 126 + - 130 + parent: 142 +- id: 133 kind: Ident span: 1:52-56 ident: !Ident @@ -86,22 +86,22 @@ nodes: - tracks - name targets: - - 125 - parent: 140 -- id: 133 + - 126 + parent: 141 +- id: 134 kind: RqOperator span: 1:68-95 alias: bin targets: - - 135 - - 139 - parent: 140 -- id: 135 + - 136 + - 140 + parent: 141 +- id: 136 kind: RqOperator span: 1:81-88 targets: - - 138 -- id: 138 + - 139 +- id: 139 kind: Ident span: 1:70-78 ident: !Ident @@ -109,33 +109,33 @@ nodes: - tracks - album_id targets: - - 125 -- id: 139 + - 126 +- id: 140 kind: Literal span: 1:92-94 -- id: 140 +- id: 141 kind: Tuple span: 1:46-97 children: - - 132 - 133 - parent: 141 -- id: 141 + - 134 + parent: 142 +- id: 142 kind: 'TransformCall: Select' span: 1:39-97 children: - - 131 - - 140 - parent: 143 -- id: 143 + - 132 + - 141 + parent: 144 +- id: 144 kind: 'TransformCall: Take' span: 1:98-105 children: - - 141 - - 144 -- id: 144 + - 142 + - 145 +- id: 145 kind: Literal - parent: 143 + parent: 144 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 957f312352e1..b0da940fe712 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: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: genres table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:20-31 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: genres table: - default_db @@ -29,10 +29,10 @@ frames: - - 1:32-39 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: genres table: - default_db @@ -40,10 +40,10 @@ frames: - - 1:40-51 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: genres table: - default_db @@ -53,81 +53,81 @@ frames: - !Single name: - d - target_id: 143 + target_id: 144 target_name: null inputs: - - id: 131 + - id: 132 name: genres table: - default_db - genres nodes: -- id: 131 +- id: 132 kind: Ident span: 1:0-11 ident: !Ident - default_db - genres - parent: 134 -- id: 134 + parent: 135 +- id: 135 kind: 'TransformCall: Take' span: 1:12-19 children: - - 131 - - 135 - parent: 137 -- id: 135 - kind: Literal - parent: 134 + - 132 + - 136 + parent: 138 - id: 136 kind: Literal - span: 1:27-31 - parent: 137 + parent: 135 - id: 137 + kind: Literal + span: 1:27-31 + parent: 138 +- id: 138 kind: 'TransformCall: Filter' span: 1:20-31 children: - - 134 - - 136 - parent: 139 -- id: 139 + - 135 + - 137 + parent: 140 +- id: 140 kind: 'TransformCall: Take' span: 1:32-39 children: - - 137 - - 140 - parent: 142 -- id: 140 - kind: Literal - parent: 139 + - 138 + - 141 + parent: 143 - id: 141 kind: Literal - span: 1:47-51 - parent: 142 + parent: 140 - id: 142 + kind: Literal + span: 1:47-51 + parent: 143 +- id: 143 kind: 'TransformCall: Filter' span: 1:40-51 children: - - 139 - - 141 - parent: 145 -- id: 143 + - 140 + - 142 + parent: 146 +- id: 144 kind: Literal span: 1:63-65 alias: d - parent: 144 -- id: 144 + parent: 145 +- id: 145 kind: Tuple span: 1:63-65 children: - - 143 - parent: 145 -- id: 145 + - 144 + parent: 146 +- id: 146 kind: 'TransformCall: Select' span: 1:52-65 children: - - 142 - - 144 + - 143 + - 145 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 c6272dffce71..1cdea4689f8c 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: 122 + input_id: 123 except: [] inputs: - - id: 122 + - id: 123 name: invoices table: - default_db @@ -20,99 +20,99 @@ frames: - !Single name: - d1 - target_id: 127 + target_id: 128 target_name: null - !Single name: - d2 - target_id: 132 + target_id: 133 target_name: null - !Single name: - d3 - target_id: 137 + target_id: 138 target_name: null - !Single name: - d4 - target_id: 142 + target_id: 143 target_name: null - !Single name: - d5 - target_id: 147 + target_id: 148 target_name: null - !Single name: - d6 - target_id: 152 + target_id: 153 target_name: null - !Single name: - d7 - target_id: 157 + target_id: 158 target_name: null - !Single name: - d8 - target_id: 162 + target_id: 163 target_name: null - !Single name: - d9 - target_id: 167 + target_id: 168 target_name: null - !Single name: - d10 - target_id: 172 + target_id: 173 target_name: null - !Single name: - d11 - target_id: 177 + target_id: 178 target_name: null - !Single name: - d12 - target_id: 182 + target_id: 183 target_name: null inputs: - - id: 122 + - id: 123 name: invoices table: - default_db - invoices nodes: -- id: 122 +- id: 123 kind: Ident span: 1:57-70 ident: !Ident - default_db - invoices - parent: 125 -- id: 125 + parent: 126 +- id: 126 kind: 'TransformCall: Take' span: 1:71-78 children: - - 122 - - 126 - parent: 188 -- id: 126 - kind: Literal - parent: 125 + - 123 + - 127 + parent: 189 - id: 127 + kind: Literal + parent: 126 +- id: 128 kind: RqOperator span: 1:113-136 alias: d1 targets: - - 130 - 131 - parent: 187 -- id: 130 + - 132 + parent: 188 +- id: 131 kind: Literal span: 1:126-136 -- id: 131 +- id: 132 kind: Ident span: 1:98-110 ident: !Ident @@ -120,19 +120,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 132 + - 123 +- id: 133 kind: RqOperator span: 1:164-181 alias: d2 targets: - - 135 - 136 - parent: 187 -- id: 135 + - 137 + parent: 188 +- id: 136 kind: Literal span: 1:177-181 -- id: 136 +- id: 137 kind: Ident span: 1:149-161 ident: !Ident @@ -140,19 +140,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 137 + - 123 +- id: 138 kind: RqOperator span: 1:209-226 alias: d3 targets: - - 140 - 141 - parent: 187 -- id: 140 + - 142 + parent: 188 +- id: 141 kind: Literal span: 1:222-226 -- id: 141 +- id: 142 kind: Ident span: 1:194-206 ident: !Ident @@ -160,19 +160,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 142 + - 123 +- id: 143 kind: RqOperator span: 1:254-280 alias: d4 targets: - - 145 - 146 - parent: 187 -- id: 145 + - 147 + parent: 188 +- id: 146 kind: Literal span: 1:267-280 -- id: 146 +- id: 147 kind: Ident span: 1:239-251 ident: !Ident @@ -180,19 +180,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 147 + - 123 +- id: 148 kind: RqOperator span: 1:308-325 alias: d5 targets: - - 150 - 151 - parent: 187 -- id: 150 + - 152 + parent: 188 +- id: 151 kind: Literal span: 1:321-325 -- id: 151 +- id: 152 kind: Ident span: 1:293-305 ident: !Ident @@ -200,19 +200,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 152 + - 123 +- id: 153 kind: RqOperator span: 1:353-380 alias: d6 targets: - - 155 - 156 - parent: 187 -- id: 155 + - 157 + parent: 188 +- id: 156 kind: Literal span: 1:366-380 -- id: 156 +- id: 157 kind: Ident span: 1:338-350 ident: !Ident @@ -220,19 +220,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 157 + - 123 +- id: 158 kind: RqOperator span: 1:408-451 alias: d7 targets: - - 160 - 161 - parent: 187 -- id: 160 + - 162 + parent: 188 +- id: 161 kind: Literal span: 1:421-451 -- id: 161 +- id: 162 kind: Ident span: 1:393-405 ident: !Ident @@ -240,19 +240,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 162 + - 123 +- id: 163 kind: RqOperator span: 1:479-496 alias: d8 targets: - - 165 - 166 - parent: 187 -- id: 165 + - 167 + parent: 188 +- id: 166 kind: Literal span: 1:492-496 -- id: 166 +- id: 167 kind: Ident span: 1:464-476 ident: !Ident @@ -260,19 +260,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 167 + - 123 +- id: 168 kind: RqOperator span: 1:524-549 alias: d9 targets: - - 170 - 171 - parent: 187 -- id: 170 + - 172 + parent: 188 +- id: 171 kind: Literal span: 1:537-549 -- id: 171 +- id: 172 kind: Ident span: 1:509-521 ident: !Ident @@ -280,19 +280,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 172 + - 123 +- id: 173 kind: RqOperator span: 1:578-603 alias: d10 targets: - - 175 - 176 - parent: 187 -- id: 175 + - 177 + parent: 188 +- id: 176 kind: Literal span: 1:591-603 -- id: 176 +- id: 177 kind: Ident span: 1:563-575 ident: !Ident @@ -300,19 +300,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 177 + - 123 +- id: 178 kind: RqOperator span: 1:632-654 alias: d11 targets: - - 180 - 181 - parent: 187 -- id: 180 + - 182 + parent: 188 +- id: 181 kind: Literal span: 1:645-654 -- id: 181 +- id: 182 kind: Ident span: 1:617-629 ident: !Ident @@ -320,19 +320,19 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 182 + - 123 +- id: 183 kind: RqOperator span: 1:683-714 alias: d12 targets: - - 185 - 186 - parent: 187 -- id: 185 + - 187 + parent: 188 +- id: 186 kind: Literal span: 1:696-714 -- id: 186 +- id: 187 kind: Ident span: 1:668-680 ident: !Ident @@ -340,30 +340,30 @@ nodes: - invoices - invoice_date targets: - - 122 -- id: 187 + - 123 +- id: 188 kind: Tuple span: 1:86-718 children: - - 127 - - 132 - - 137 - - 142 - - 147 - - 152 - - 157 - - 162 - - 167 - - 172 - - 177 - - 182 - parent: 188 -- id: 188 + - 128 + - 133 + - 138 + - 143 + - 148 + - 153 + - 158 + - 163 + - 168 + - 173 + - 178 + - 183 + parent: 189 +- id: 189 kind: 'TransformCall: Select' span: 1:79-718 children: - - 125 - - 187 + - 126 + - 188 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 af30d247b628..3d6f0f45d616 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: 127 + target_id: 128 target_name: null - !Single name: - tracks - genre_id - target_id: 128 + target_id: 129 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -30,16 +30,16 @@ frames: name: - tracks - album_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - tracks - genre_id - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -50,29 +50,29 @@ frames: name: - tracks - album_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - tracks - genre_id - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db - tracks nodes: -- id: 125 +- id: 126 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 130 -- id: 127 + parent: 131 +- id: 128 kind: Ident span: 1:33-41 ident: !Ident @@ -80,9 +80,9 @@ nodes: - tracks - album_id targets: - - 125 - parent: 129 -- id: 128 + - 126 + parent: 130 +- id: 129 kind: Ident span: 1:43-51 ident: !Ident @@ -90,81 +90,81 @@ nodes: - tracks - genre_id targets: - - 125 - parent: 129 -- id: 129 + - 126 + parent: 130 +- id: 130 kind: Tuple span: 1:32-52 children: - - 127 - 128 - parent: 130 -- id: 130 + - 129 + parent: 131 +- id: 131 kind: 'TransformCall: Select' span: 1:25-52 children: - - 125 - - 129 - parent: 151 -- id: 132 + - 126 + - 130 + parent: 152 +- id: 133 kind: Ident ident: !Ident - this - tracks - album_id targets: - - 127 - parent: 134 -- id: 133 + - 128 + parent: 135 +- id: 134 kind: Ident ident: !Ident - this - tracks - genre_id targets: - - 128 - parent: 134 -- id: 134 + - 129 + parent: 135 +- id: 135 kind: Tuple span: 1:59-67 children: - - 132 - 133 -- id: 151 + - 134 +- id: 152 kind: 'TransformCall: Take' span: 1:69-75 children: - - 130 - - 152 - parent: 159 -- id: 152 + - 131 + - 153 + parent: 160 +- id: 153 kind: Literal - parent: 151 -- id: 156 + parent: 152 +- id: 157 kind: Ident ident: !Ident - this - tracks - album_id targets: - - 132 - parent: 159 -- id: 157 + - 133 + parent: 160 +- id: 158 kind: Ident ident: !Ident - this - tracks - genre_id targets: - - 133 - parent: 159 -- id: 159 + - 134 + parent: 160 +- id: 160 kind: 'TransformCall: Sort' span: 1:77-90 children: - - 151 - - 156 + - 152 - 157 + - 158 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 d7dd155f72b9..5b4d6ad8f531 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: 127 + target_id: 128 target_name: null - !Single name: - tracks - media_type_id - target_id: 128 + target_id: 129 target_name: null - !Single name: - tracks - album_id - target_id: 129 + target_id: 130 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -36,22 +36,22 @@ frames: name: - tracks - genre_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - tracks - media_type_id - target_id: 133 + target_id: 134 target_name: null - !Single name: - tracks - album_id - target_id: 129 + target_id: 130 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -62,35 +62,35 @@ frames: name: - tracks - genre_id - target_id: 132 + target_id: 133 target_name: null - !Single name: - tracks - media_type_id - target_id: 133 + target_id: 134 target_name: null - !Single name: - tracks - album_id - target_id: 129 + target_id: 130 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db - tracks nodes: -- id: 125 +- id: 126 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 131 -- id: 127 + parent: 132 +- id: 128 kind: Ident span: 1:33-41 ident: !Ident @@ -98,9 +98,9 @@ nodes: - tracks - genre_id targets: - - 125 - parent: 130 -- id: 128 + - 126 + parent: 131 +- id: 129 kind: Ident span: 1:43-56 ident: !Ident @@ -108,9 +108,9 @@ nodes: - tracks - media_type_id targets: - - 125 - parent: 130 -- id: 129 + - 126 + parent: 131 +- id: 130 kind: Ident span: 1:58-66 ident: !Ident @@ -118,24 +118,24 @@ nodes: - tracks - album_id targets: - - 125 - parent: 130 -- id: 130 + - 126 + parent: 131 +- id: 131 kind: Tuple span: 1:32-67 children: - - 127 - 128 - 129 - parent: 131 -- id: 131 + - 130 + parent: 132 +- id: 132 kind: 'TransformCall: Select' span: 1:25-67 children: - - 125 - - 130 - parent: 163 -- id: 132 + - 126 + - 131 + parent: 164 +- id: 133 kind: Ident span: 1:75-83 ident: !Ident @@ -143,9 +143,9 @@ nodes: - tracks - genre_id targets: - - 127 - parent: 134 -- id: 133 + - 128 + parent: 135 +- id: 134 kind: Ident span: 1:85-98 ident: !Ident @@ -153,15 +153,15 @@ nodes: - tracks - media_type_id targets: - - 128 - parent: 134 -- id: 134 + - 129 + parent: 135 +- id: 135 kind: Tuple span: 1:74-99 children: - - 132 - 133 -- id: 159 + - 134 +- id: 160 kind: Ident span: 1:108-116 ident: !Ident @@ -169,18 +169,18 @@ nodes: - tracks - album_id targets: - - 129 -- id: 163 + - 130 +- id: 164 kind: 'TransformCall: Take' span: 1:120-126 children: - - 131 - - 164 - parent: 172 -- id: 164 + - 132 + - 165 + parent: 173 +- id: 165 kind: Literal - parent: 163 -- id: 169 + parent: 164 +- id: 170 kind: Ident span: 1:135-143 ident: !Ident @@ -188,9 +188,9 @@ nodes: - tracks - genre_id targets: - - 132 - parent: 172 -- id: 170 + - 133 + parent: 173 +- id: 171 kind: Ident span: 1:145-158 ident: !Ident @@ -198,15 +198,15 @@ nodes: - tracks - media_type_id targets: - - 133 - parent: 172 -- id: 172 + - 134 + parent: 173 +- id: 173 kind: 'TransformCall: Sort' span: 1:128-159 children: - - 163 - - 169 + - 164 - 170 + - 171 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 4c32fec2452e..88abc818ecb1 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: 137 + target_id: 138 target_name: a inputs: - - id: 137 + - id: 138 name: genre_count table: - default_db @@ -23,29 +23,29 @@ frames: - !Single name: - a - target_id: 144 + target_id: 145 target_name: null inputs: - - id: 137 + - id: 138 name: genre_count table: - default_db - genres nodes: -- id: 137 +- id: 138 kind: Ident span: 1:187-203 ident: !Ident - genre_count - parent: 143 -- id: 139 + parent: 144 +- id: 140 kind: RqOperator span: 1:211-216 targets: - - 141 - 142 - parent: 143 -- id: 141 + - 143 + parent: 144 +- id: 142 kind: Ident span: 1:211-212 ident: !Ident @@ -53,25 +53,25 @@ nodes: - genre_count - a targets: - - 137 -- id: 142 + - 138 +- id: 143 kind: Literal span: 1:215-216 -- id: 143 +- id: 144 kind: 'TransformCall: Filter' span: 1:204-216 children: - - 137 - - 139 - parent: 148 -- id: 144 + - 138 + - 140 + parent: 149 +- id: 145 kind: RqOperator span: 1:228-230 alias: a targets: - - 146 - parent: 147 -- id: 146 + - 147 + parent: 148 +- id: 147 kind: Ident span: 1:229-230 ident: !Ident @@ -79,19 +79,19 @@ nodes: - genre_count - a targets: - - 137 -- id: 147 + - 138 +- id: 148 kind: Tuple span: 1:228-230 children: - - 144 - parent: 148 -- id: 148 + - 145 + parent: 149 +- id: 149 kind: 'TransformCall: Select' span: 1:217-230 children: - - 143 - - 147 + - 144 + - 148 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 f900324a8881..1f46e07de8da 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: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: a table: - default_db @@ -18,18 +18,18 @@ frames: - - 1:35-59 - columns: - !All - input_id: 129 + input_id: 130 except: [] - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 129 + - id: 130 name: a table: - default_db - albums - - id: 123 + - id: 124 name: tracks table: - default_db @@ -40,26 +40,26 @@ frames: name: - a - album_id - target_id: 139 + target_id: 140 target_name: null - !Single name: - a - title - target_id: 140 + target_id: 141 target_name: null - !Single name: - price - target_id: 158 + target_id: 159 target_name: null inputs: - - id: 129 + - id: 130 name: a table: - default_db - albums - - id: 123 + - id: 124 name: tracks table: - default_db @@ -70,63 +70,63 @@ frames: name: - a - album_id - target_id: 139 + target_id: 140 target_name: null - !Single name: - a - title - target_id: 140 + target_id: 141 target_name: null - !Single name: - price - target_id: 158 + target_id: 159 target_name: null inputs: - - id: 129 + - id: 130 name: a table: - default_db - albums - - id: 123 + - id: 124 name: tracks table: - default_db - tracks nodes: -- id: 123 +- id: 124 kind: Ident span: 1:40-46 ident: !Ident - default_db - tracks - parent: 138 -- id: 129 + parent: 139 +- id: 130 kind: Ident span: 1:13-26 ident: !Ident - default_db - albums - parent: 132 -- id: 132 + parent: 133 +- id: 133 kind: 'TransformCall: Take' span: 1:27-34 children: - - 129 - - 133 - parent: 138 -- id: 133 - kind: Literal - parent: 132 + - 130 + - 134 + parent: 139 - id: 134 + kind: Literal + parent: 133 +- id: 135 kind: RqOperator span: 1:48-58 targets: - - 136 - 137 - parent: 138 -- id: 136 + - 138 + parent: 139 +- id: 137 kind: Ident span: 1:50-58 ident: !Ident @@ -134,8 +134,8 @@ nodes: - a - album_id targets: - - 129 -- id: 137 + - 130 +- id: 138 kind: Ident span: 1:50-58 ident: !Ident @@ -143,16 +143,16 @@ nodes: - tracks - album_id targets: - - 123 -- id: 138 + - 124 +- id: 139 kind: 'TransformCall: Join' span: 1:35-59 children: - - 132 - - 123 - - 134 - parent: 166 -- id: 139 + - 133 + - 124 + - 135 + parent: 167 +- id: 140 kind: Ident span: 1:67-77 ident: !Ident @@ -160,9 +160,9 @@ nodes: - a - album_id targets: - - 129 - parent: 141 -- id: 140 + - 130 + parent: 142 +- id: 141 kind: Ident span: 1:79-86 ident: !Ident @@ -170,32 +170,32 @@ nodes: - a - title targets: - - 129 - parent: 141 -- id: 141 + - 130 + parent: 142 +- id: 142 kind: Tuple span: 1:66-87 children: - - 139 - 140 - parent: 166 -- id: 158 + - 141 + parent: 167 +- id: 159 kind: RqOperator span: 1:132-144 alias: price targets: - - 161 - 162 - parent: 165 -- id: 161 + - 163 + parent: 166 +- id: 162 kind: Literal span: 1:143-144 -- id: 162 +- id: 163 kind: RqOperator span: 1:108-129 targets: - - 164 -- id: 164 + - 165 +- id: 165 kind: Ident span: 1:112-129 ident: !Ident @@ -203,22 +203,22 @@ nodes: - tracks - unit_price targets: - - 123 -- id: 165 + - 124 +- id: 166 kind: Tuple span: 1:132-144 children: - - 158 - parent: 166 -- id: 166 + - 159 + parent: 167 +- id: 167 kind: 'TransformCall: Aggregate' span: 1:89-145 children: - - 138 - - 165 - - 141 - parent: 171 -- id: 169 + - 139 + - 166 + - 142 + parent: 172 +- id: 170 kind: Ident span: 1:152-160 ident: !Ident @@ -226,14 +226,14 @@ nodes: - a - album_id targets: - - 139 - parent: 171 -- id: 171 + - 140 + parent: 172 +- id: 172 kind: 'TransformCall: Sort' span: 1:147-160 children: - - 166 - - 169 + - 167 + - 170 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 62ef7e3d04f9..6fc26a67ac8d 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: 131 + input_id: 132 except: [] - !Single name: - d - target_id: 133 + target_id: 134 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -25,15 +25,15 @@ frames: - !Single name: - d - target_id: 139 + target_id: 140 target_name: null - !Single name: - n1 - target_id: 156 + target_id: 157 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -43,15 +43,15 @@ frames: - !Single name: - d - target_id: 139 + target_id: 140 target_name: null - !Single name: - n1 - target_id: 156 + target_id: 157 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -61,15 +61,15 @@ frames: - !Single name: - d - target_id: 139 + target_id: 140 target_name: null - !Single name: - n1 - target_id: 156 + target_id: 157 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -79,36 +79,36 @@ frames: - !Single name: - d1 - target_id: 169 + target_id: 170 target_name: null - !Single name: - n1 - target_id: 170 + target_id: 171 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db - tracks nodes: -- id: 131 +- id: 132 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 138 -- id: 133 + parent: 139 +- id: 134 kind: RqOperator span: 1:36-48 alias: d targets: - - 135 - 136 - parent: 137 -- id: 135 + - 137 + parent: 138 +- id: 136 kind: Ident span: 1:36-44 ident: !Ident @@ -116,46 +116,46 @@ nodes: - tracks - album_id targets: - - 131 -- id: 136 + - 132 +- id: 137 kind: Literal span: 1:47-48 -- id: 137 +- id: 138 kind: Tuple span: 1:36-48 children: - - 133 - parent: 138 -- id: 138 + - 134 + parent: 139 +- id: 139 kind: 'TransformCall: Derive' span: 1:25-48 children: - - 131 - - 137 - parent: 160 -- id: 139 + - 132 + - 138 + parent: 161 +- id: 140 kind: Ident span: 1:55-56 ident: !Ident - this - d targets: - - 133 - parent: 142 -- id: 142 + - 134 + parent: 143 +- id: 143 kind: Tuple span: 1:55-56 children: - - 139 - parent: 160 -- id: 156 + - 140 + parent: 161 +- id: 157 kind: RqOperator span: 1:100-103 alias: n1 targets: - - 158 - parent: 159 -- id: 158 + - 159 + parent: 160 +- id: 159 kind: Ident span: 1:89-97 ident: !Ident @@ -163,48 +163,48 @@ nodes: - tracks - track_id targets: - - 131 -- id: 159 + - 132 +- id: 160 kind: Tuple span: 1:73-111 children: - - 156 - parent: 160 -- id: 160 + - 157 + parent: 161 +- id: 161 kind: 'TransformCall: Aggregate' span: 1:63-111 children: - - 138 - - 159 - - 142 - parent: 165 -- id: 163 + - 139 + - 160 + - 143 + parent: 166 +- id: 164 kind: Ident span: 1:119-120 ident: !Ident - this - d targets: - - 139 - parent: 165 -- id: 165 + - 140 + parent: 166 +- id: 166 kind: 'TransformCall: Sort' span: 1:114-120 children: - - 160 - - 163 - parent: 167 -- id: 167 + - 161 + - 164 + parent: 168 +- id: 168 kind: 'TransformCall: Take' span: 1:121-128 children: - - 165 - - 168 - parent: 172 -- id: 168 - kind: Literal - parent: 167 + - 166 + - 169 + parent: 173 - id: 169 + kind: Literal + parent: 168 +- id: 170 kind: Ident span: 1:143-144 alias: d1 @@ -212,30 +212,30 @@ nodes: - this - d targets: - - 139 - parent: 171 -- id: 170 + - 140 + parent: 172 +- id: 171 kind: Ident span: 1:146-148 ident: !Ident - this - n1 targets: - - 156 - parent: 171 -- id: 171 + - 157 + parent: 172 +- id: 172 kind: Tuple span: 1:136-150 children: - - 169 - 170 - parent: 172 -- id: 172 + - 171 + parent: 173 +- id: 173 kind: 'TransformCall: Select' span: 1:129-150 children: - - 167 - - 171 + - 168 + - 172 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 bd7c565333d9..0aab2560eed2 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_130 + - _literal_131 - artist_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - album_title_count - target_id: 150 + target_id: 151 target_name: null inputs: - - id: 130 - name: _literal_130 + - id: 131 + name: _literal_131 table: - default_db - - _literal_130 + - _literal_131 - - 1:119-164 - columns: - !Single name: - - _literal_130 + - _literal_131 - artist_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - album_title_count - target_id: 150 + target_id: 151 target_name: null inputs: - - id: 130 - name: _literal_130 + - id: 131 + name: _literal_131 table: - default_db - - _literal_130 + - _literal_131 - - 1:165-214 - columns: - !Single name: - - _literal_130 + - _literal_131 - artist_id - target_id: 131 + target_id: 132 target_name: null - !Single name: - album_title_count - target_id: 150 + target_id: 151 target_name: null - !Single name: - new_album_count - target_id: 160 + target_id: 161 target_name: null inputs: - - id: 130 - name: _literal_130 + - id: 131 + name: _literal_131 table: - default_db - - _literal_130 + - _literal_131 - - 1:215-260 - columns: - !Single name: - - _literal_130 + - _literal_131 - artist_id - target_id: 163 + target_id: 164 target_name: null - !Single name: - new_album_count - target_id: 164 + target_id: 165 target_name: null inputs: - - id: 130 - name: _literal_130 + - id: 131 + name: _literal_131 table: - default_db - - _literal_130 + - _literal_131 - - 1:261-367 - columns: - !Single name: - - _literal_130 + - _literal_131 - artist_id - target_id: 163 + target_id: 164 target_name: null - !Single name: - new_album_count - target_id: 164 + target_id: 165 target_name: null - !All - input_id: 117 + input_id: 118 except: [] inputs: - - id: 130 - name: _literal_130 + - id: 131 + name: _literal_131 table: - default_db - - _literal_130 - - id: 117 - name: _literal_117 + - _literal_131 + - id: 118 + name: _literal_118 table: - default_db - - _literal_117 + - _literal_118 nodes: -- id: 117 +- id: 118 kind: SString span: 1:278-330 - parent: 171 -- id: 130 + parent: 172 +- id: 131 kind: SString span: 1:0-46 - parent: 153 -- id: 131 + parent: 154 +- id: 132 kind: Ident span: 1:54-63 ident: !Ident - this - - _literal_130 + - _literal_131 - artist_id targets: - - 130 - parent: 132 -- id: 132 + - 131 + parent: 133 +- id: 133 kind: Tuple span: 1:53-64 children: - - 131 - parent: 153 -- id: 150 + - 132 + parent: 154 +- id: 151 kind: RqOperator span: 1:98-116 alias: album_title_count targets: - - 151 - parent: 152 -- id: 151 - kind: Literal + - 152 + parent: 153 - id: 152 + kind: Literal +- id: 153 kind: Tuple span: 1:76-117 children: - - 150 - parent: 153 -- id: 153 + - 151 + parent: 154 +- id: 154 kind: 'TransformCall: Aggregate' span: 1:66-117 children: - - 130 - - 152 - - 132 - parent: 159 -- id: 156 + - 131 + - 153 + - 133 + parent: 160 +- id: 157 kind: Ident span: 1:125-139 ident: !Ident - this - - _literal_130 + - _literal_131 - artist_id targets: - - 131 - parent: 159 -- id: 157 + - 132 + parent: 160 +- id: 158 kind: Ident span: 1:141-163 ident: !Ident - this - album_title_count targets: - - 150 - parent: 159 -- id: 159 + - 151 + parent: 160 +- id: 160 kind: 'TransformCall: Sort' span: 1:119-164 children: - - 153 - - 156 + - 154 - 157 - parent: 162 -- id: 160 + - 158 + parent: 163 +- id: 161 kind: Ident span: 1:191-213 alias: new_album_count @@ -195,86 +195,86 @@ nodes: - this - album_title_count targets: - - 150 - parent: 161 -- id: 161 + - 151 + parent: 162 +- id: 162 kind: Tuple span: 1:172-214 children: - - 160 - parent: 162 -- id: 162 + - 161 + parent: 163 +- id: 163 kind: 'TransformCall: Derive' span: 1:165-214 children: - - 159 - - 161 - parent: 166 -- id: 163 + - 160 + - 162 + parent: 167 +- id: 164 kind: Ident span: 1:223-237 ident: !Ident - this - - _literal_130 + - _literal_131 - artist_id targets: - - 131 - parent: 165 -- id: 164 + - 132 + parent: 166 +- id: 165 kind: Ident span: 1:239-259 ident: !Ident - this - new_album_count targets: - - 160 - parent: 165 -- id: 165 + - 161 + parent: 166 +- id: 166 kind: Tuple span: 1:222-260 children: - - 163 - 164 - parent: 166 -- id: 166 + - 165 + parent: 167 +- id: 167 kind: 'TransformCall: Select' span: 1:215-260 children: - - 162 - - 165 - parent: 171 -- id: 167 + - 163 + - 166 + parent: 172 +- id: 168 kind: RqOperator span: 1:334-366 targets: - - 169 - 170 - parent: 171 -- id: 169 + - 171 + parent: 172 +- id: 170 kind: Ident span: 1:334-348 ident: !Ident - this - - _literal_130 + - _literal_131 - artist_id targets: - - 163 -- id: 170 + - 164 +- id: 171 kind: Ident span: 1:352-366 ident: !Ident - that - - _literal_117 + - _literal_118 - artist_id targets: - - 117 -- id: 171 + - 118 +- id: 172 kind: 'TransformCall: Join' span: 1:261-367 children: - - 166 - - 117 - 167 + - 118 + - 168 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 eaa5217f9029..a7e780fa9ac7 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_133 + - _literal_134 - artist_id - target_id: 134 + target_id: 135 target_name: null - !Single name: - album_title_count - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:119-164 - columns: - !Single name: - - _literal_133 + - _literal_134 - artist_id - target_id: 134 + target_id: 135 target_name: null - !Single name: - album_title_count - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:165-201 - columns: - !Single name: - - _literal_133 + - _literal_134 - artist_id - target_id: 134 + target_id: 135 target_name: null - !Single name: - album_title_count - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:202-251 - columns: - !Single name: - - _literal_133 + - _literal_134 - artist_id - target_id: 134 + target_id: 135 target_name: null - !Single name: - album_title_count - target_id: 153 + target_id: 154 target_name: null - !Single name: - new_album_count - target_id: 168 + target_id: 169 target_name: null inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:252-297 - columns: - !Single name: - - _literal_133 + - _literal_134 - artist_id - target_id: 171 + target_id: 172 target_name: null - !Single name: - new_album_count - target_id: 172 + target_id: 173 target_name: null inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:298-404 - columns: - !Single name: - - _literal_133 + - _literal_134 - artist_id - target_id: 171 + target_id: 172 target_name: null - !Single name: - new_album_count - target_id: 172 + target_id: 173 target_name: null - !All - input_id: 117 + input_id: 118 except: [] inputs: - - id: 133 - name: _literal_133 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 - - id: 117 - name: _literal_117 + - _literal_134 + - id: 118 + name: _literal_118 table: - default_db - - _literal_117 + - _literal_118 nodes: -- id: 117 +- id: 118 kind: SString span: 1:315-367 - parent: 179 -- id: 133 + parent: 180 +- id: 134 kind: SString span: 1:0-46 - parent: 156 -- id: 134 + parent: 157 +- id: 135 kind: Ident span: 1:54-63 ident: !Ident - this - - _literal_133 + - _literal_134 - artist_id targets: - - 133 - parent: 135 -- id: 135 + - 134 + parent: 136 +- id: 136 kind: Tuple span: 1:53-64 children: - - 134 - parent: 156 -- id: 153 + - 135 + parent: 157 +- id: 154 kind: RqOperator span: 1:98-116 alias: album_title_count targets: - - 154 - parent: 155 -- id: 154 - kind: Literal + - 155 + parent: 156 - id: 155 + kind: Literal +- id: 156 kind: Tuple span: 1:76-117 children: - - 153 - parent: 156 -- id: 156 + - 154 + parent: 157 +- id: 157 kind: 'TransformCall: Aggregate' span: 1:66-117 children: - - 133 - - 155 - - 135 - parent: 162 -- id: 159 + - 134 + - 156 + - 136 + parent: 163 +- id: 160 kind: Ident span: 1:125-139 ident: !Ident - this - - _literal_133 + - _literal_134 - artist_id targets: - - 134 - parent: 162 -- id: 160 + - 135 + parent: 163 +- id: 161 kind: Ident span: 1:141-163 ident: !Ident - this - album_title_count targets: - - 153 - parent: 162 -- id: 162 + - 154 + parent: 163 +- id: 163 kind: 'TransformCall: Sort' span: 1:119-164 children: - - 156 - - 159 + - 157 - 160 - parent: 167 -- id: 163 + - 161 + parent: 168 +- id: 164 kind: RqOperator span: 1:172-201 targets: - - 165 - 166 - parent: 167 -- id: 165 + - 167 + parent: 168 +- id: 166 kind: Ident span: 1:173-195 ident: !Ident - this - album_title_count targets: - - 153 -- id: 166 + - 154 +- id: 167 kind: Literal span: 1:199-201 -- id: 167 +- id: 168 kind: 'TransformCall: Filter' span: 1:165-201 children: - - 162 - 163 - parent: 170 -- id: 168 + - 164 + parent: 171 +- id: 169 kind: Ident span: 1:228-250 alias: new_album_count @@ -239,86 +239,86 @@ nodes: - this - album_title_count targets: - - 153 - parent: 169 -- id: 169 + - 154 + parent: 170 +- id: 170 kind: Tuple span: 1:209-251 children: - - 168 - parent: 170 -- id: 170 + - 169 + parent: 171 +- id: 171 kind: 'TransformCall: Derive' span: 1:202-251 children: - - 167 - - 169 - parent: 174 -- id: 171 + - 168 + - 170 + parent: 175 +- id: 172 kind: Ident span: 1:260-274 ident: !Ident - this - - _literal_133 + - _literal_134 - artist_id targets: - - 134 - parent: 173 -- id: 172 + - 135 + parent: 174 +- id: 173 kind: Ident span: 1:276-296 ident: !Ident - this - new_album_count targets: - - 168 - parent: 173 -- id: 173 + - 169 + parent: 174 +- id: 174 kind: Tuple span: 1:259-297 children: - - 171 - 172 - parent: 174 -- id: 174 + - 173 + parent: 175 +- id: 175 kind: 'TransformCall: Select' span: 1:252-297 children: - - 170 - - 173 - parent: 179 -- id: 175 + - 171 + - 174 + parent: 180 +- id: 176 kind: RqOperator span: 1:371-403 targets: - - 177 - 178 - parent: 179 -- id: 177 + - 179 + parent: 180 +- id: 178 kind: Ident span: 1:371-385 ident: !Ident - this - - _literal_133 + - _literal_134 - artist_id targets: - - 171 -- id: 178 + - 172 +- id: 179 kind: Ident span: 1:389-403 ident: !Ident - that - - _literal_117 + - _literal_118 - artist_id targets: - - 117 -- id: 179 + - 118 +- id: 180 kind: 'TransformCall: Join' span: 1:298-404 children: - - 174 - - 117 - 175 + - 118 + - 176 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 84e440d71f91..bdf51afb940b 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: 134 + target_id: 135 target_name: null - !Single name: - tracks - milliseconds - target_id: 135 + target_id: 136 target_name: null inputs: - - id: 132 + - id: 133 name: tracks table: - default_db @@ -30,16 +30,16 @@ frames: name: - tracks - genre_id - target_id: 138 + target_id: 139 target_name: null - !Single name: - tracks - milliseconds - target_id: 135 + target_id: 136 target_name: null inputs: - - id: 132 + - id: 133 name: tracks table: - default_db @@ -50,24 +50,24 @@ frames: name: - tracks - genre_id - target_id: 138 + target_id: 139 target_name: null - !Single name: - tracks - milliseconds - target_id: 135 + target_id: 136 target_name: null - !All - input_id: 123 + input_id: 124 except: [] inputs: - - id: 132 + - id: 133 name: tracks table: - default_db - tracks - - id: 123 + - id: 124 name: genres table: - default_db @@ -78,21 +78,21 @@ frames: name: - genres - name - target_id: 176 + target_id: 177 target_name: null - !Single name: - tracks - milliseconds - target_id: 177 + target_id: 178 target_name: null inputs: - - id: 132 + - id: 133 name: tracks table: - default_db - tracks - - id: 123 + - id: 124 name: genres table: - default_db @@ -103,41 +103,41 @@ frames: name: - genres - name - target_id: 176 + target_id: 177 target_name: null - !Single name: - tracks - milliseconds - target_id: 177 + target_id: 178 target_name: null inputs: - - id: 132 + - id: 133 name: tracks table: - default_db - tracks - - id: 123 + - id: 124 name: genres table: - default_db - genres nodes: -- id: 123 +- id: 124 kind: Ident span: 1:177-183 ident: !Ident - default_db - genres - parent: 175 -- id: 132 + parent: 176 +- id: 133 kind: Ident span: 1:76-87 ident: !Ident - default_db - tracks - parent: 137 -- id: 134 + parent: 138 +- id: 135 kind: Ident span: 1:96-104 ident: !Ident @@ -145,9 +145,9 @@ nodes: - tracks - genre_id targets: - - 132 - parent: 136 -- id: 135 + - 133 + parent: 137 +- id: 136 kind: Ident span: 1:105-117 ident: !Ident @@ -155,23 +155,23 @@ nodes: - tracks - milliseconds targets: - - 132 - parent: 136 -- id: 136 + - 133 + parent: 137 +- id: 137 kind: Tuple span: 1:95-118 children: - - 134 - 135 - parent: 137 -- id: 137 + - 136 + parent: 138 +- id: 138 kind: 'TransformCall: Select' span: 1:88-118 children: - - 132 - - 136 - parent: 167 -- id: 138 + - 133 + - 137 + parent: 168 +- id: 139 kind: Ident span: 1:126-134 ident: !Ident @@ -179,14 +179,14 @@ nodes: - tracks - genre_id targets: - - 134 - parent: 139 -- id: 139 + - 135 + parent: 140 +- id: 140 kind: Tuple span: 1:125-135 children: - - 138 -- id: 163 + - 139 +- id: 164 kind: Ident span: 1:147-159 ident: !Ident @@ -194,25 +194,25 @@ nodes: - tracks - milliseconds targets: - - 135 -- id: 167 + - 136 +- id: 168 kind: 'TransformCall: Take' span: 1:163-169 children: - - 137 - - 168 - parent: 175 -- id: 168 + - 138 + - 169 + parent: 176 +- id: 169 kind: Literal - parent: 167 -- id: 171 + parent: 168 +- id: 172 kind: RqOperator span: 1:185-195 targets: - - 173 - 174 - parent: 175 -- id: 173 + - 175 + parent: 176 +- id: 174 kind: Ident span: 1:187-195 ident: !Ident @@ -220,8 +220,8 @@ nodes: - tracks - genre_id targets: - - 138 -- id: 174 + - 139 +- id: 175 kind: Ident span: 1:187-195 ident: !Ident @@ -229,16 +229,16 @@ nodes: - genres - genre_id targets: - - 123 -- id: 175 + - 124 +- id: 176 kind: 'TransformCall: Join' span: 1:172-196 children: - - 167 - - 123 - - 171 - parent: 179 -- id: 176 + - 168 + - 124 + - 172 + parent: 180 +- id: 177 kind: Ident span: 1:205-209 ident: !Ident @@ -246,9 +246,9 @@ nodes: - genres - name targets: - - 123 - parent: 178 -- id: 177 + - 124 + parent: 179 +- id: 178 kind: Ident span: 1:211-223 ident: !Ident @@ -256,23 +256,23 @@ nodes: - tracks - milliseconds targets: - - 135 - parent: 178 -- id: 178 + - 136 + parent: 179 +- id: 179 kind: Tuple span: 1:204-224 children: - - 176 - 177 - parent: 179 -- id: 179 + - 178 + parent: 180 +- id: 180 kind: 'TransformCall: Select' span: 1:197-224 children: - - 175 - - 178 - parent: 185 -- id: 180 + - 176 + - 179 + parent: 186 +- id: 181 kind: Ident span: 1:231-236 ident: !Ident @@ -280,9 +280,9 @@ nodes: - genres - name targets: - - 176 - parent: 185 -- id: 183 + - 177 + parent: 186 +- id: 184 kind: Ident span: 1:238-250 ident: !Ident @@ -290,15 +290,15 @@ nodes: - tracks - milliseconds targets: - - 177 - parent: 185 -- id: 185 + - 178 + parent: 186 +- id: 186 kind: 'TransformCall: Sort' span: 1:225-251 children: - - 179 - 180 - - 183 + - 181 + - 184 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 6284a10a0141..e12231ecc791 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: 141 + input_id: 142 except: [] - !All - input_id: 138 + input_id: 139 except: [] inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -26,28 +26,28 @@ frames: - - 1:184-253 - columns: - !All - input_id: 141 + input_id: 142 except: [] - !All - input_id: 138 + input_id: 139 except: [] - !Single name: - city - target_id: 148 + target_id: 149 target_name: null - !Single name: - street - target_id: 149 + target_id: 150 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -55,23 +55,23 @@ frames: - - 1:281-323 - columns: - !All - input_id: 141 + input_id: 142 except: [] - !All - input_id: 138 + input_id: 139 except: [] - !Single name: - total - target_id: 179 + target_id: 180 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -81,35 +81,35 @@ frames: - !Single name: - city - target_id: 152 + target_id: 153 target_name: null - !Single name: - street - target_id: 153 + target_id: 154 target_name: null - !Single name: - num_orders - target_id: 185 + target_id: 186 target_name: null - !Single name: - num_tracks - target_id: 188 + target_id: 189 target_name: null - !Single name: - total_price - target_id: 191 + target_id: 192 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -119,40 +119,40 @@ frames: - !Single name: - city - target_id: 198 + target_id: 199 target_name: null - !Single name: - street - target_id: 153 + target_id: 154 target_name: null - !Single name: - num_orders - target_id: 185 + target_id: 186 target_name: null - !Single name: - num_tracks - target_id: 188 + target_id: 189 target_name: null - !Single name: - total_price - target_id: 191 + target_id: 192 target_name: null - !Single name: - running_total_num_tracks - target_id: 244 + target_id: 245 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -162,40 +162,40 @@ frames: - !Single name: - city - target_id: 198 + target_id: 199 target_name: null - !Single name: - street - target_id: 153 + target_id: 154 target_name: null - !Single name: - num_orders - target_id: 185 + target_id: 186 target_name: null - !Single name: - num_tracks - target_id: 188 + target_id: 189 target_name: null - !Single name: - total_price - target_id: 191 + target_id: 192 target_name: null - !Single name: - running_total_num_tracks - target_id: 244 + target_id: 245 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -205,45 +205,45 @@ frames: - !Single name: - city - target_id: 198 + target_id: 199 target_name: null - !Single name: - street - target_id: 153 + target_id: 154 target_name: null - !Single name: - num_orders - target_id: 185 + target_id: 186 target_name: null - !Single name: - num_tracks - target_id: 188 + target_id: 189 target_name: null - !Single name: - total_price - target_id: 191 + target_id: 192 target_name: null - !Single name: - running_total_num_tracks - target_id: 244 + target_id: 245 target_name: null - !Single name: - num_tracks_last_week - target_id: 258 + target_id: 259 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -253,40 +253,40 @@ frames: - !Single name: - city - target_id: 264 + target_id: 265 target_name: null - !Single name: - street - target_id: 265 + target_id: 266 target_name: null - !Single name: - num_orders - target_id: 266 + target_id: 267 target_name: null - !Single name: - num_tracks - target_id: 267 + target_id: 268 target_name: null - !Single name: - running_total_num_tracks - target_id: 268 + target_id: 269 target_name: null - !Single name: - num_tracks_last_week - target_id: 269 + target_id: 270 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db @@ -296,67 +296,67 @@ frames: - !Single name: - city - target_id: 264 + target_id: 265 target_name: null - !Single name: - street - target_id: 265 + target_id: 266 target_name: null - !Single name: - num_orders - target_id: 266 + target_id: 267 target_name: null - !Single name: - num_tracks - target_id: 267 + target_id: 268 target_name: null - !Single name: - running_total_num_tracks - target_id: 268 + target_id: 269 target_name: null - !Single name: - num_tracks_last_week - target_id: 269 + target_id: 270 target_name: null inputs: - - id: 141 + - id: 142 name: i table: - default_db - invoices - - id: 138 + - id: 139 name: ii table: - default_db - invoice_items nodes: -- id: 138 +- id: 139 kind: Ident span: 1:155-168 ident: !Ident - default_db - invoice_items - parent: 147 -- id: 141 + parent: 148 +- id: 142 kind: Ident span: 1:131-146 ident: !Ident - default_db - invoices - parent: 147 -- id: 143 + parent: 148 +- id: 144 kind: RqOperator span: 1:170-182 targets: - - 145 - 146 - parent: 147 -- id: 145 + - 147 + parent: 148 +- id: 146 kind: Ident span: 1:172-182 ident: !Ident @@ -364,8 +364,8 @@ nodes: - i - invoice_id targets: - - 141 -- id: 146 + - 142 +- id: 147 kind: Ident span: 1:172-182 ident: !Ident @@ -373,16 +373,16 @@ nodes: - ii - invoice_id targets: - - 138 -- id: 147 + - 139 +- id: 148 kind: 'TransformCall: Join' span: 1:147-183 children: - - 141 - - 138 - - 143 - parent: 151 -- id: 148 + - 142 + - 139 + - 144 + parent: 152 +- id: 149 kind: Ident span: 1:204-218 alias: city @@ -391,9 +391,9 @@ nodes: - i - billing_city targets: - - 141 - parent: 150 -- id: 149 + - 142 + parent: 151 +- id: 150 kind: Ident span: 1:233-250 alias: street @@ -402,56 +402,56 @@ nodes: - i - billing_address targets: - - 141 - parent: 150 -- id: 150 + - 142 + parent: 151 +- id: 151 kind: Tuple span: 1:191-253 children: - - 148 - 149 - parent: 151 -- id: 151 + - 150 + parent: 152 +- id: 152 kind: 'TransformCall: Derive' span: 1:184-253 children: - - 147 - - 150 - parent: 184 -- id: 152 + - 148 + - 151 + parent: 185 +- id: 153 kind: Ident span: 1:261-265 ident: !Ident - this - city targets: - - 148 - parent: 154 -- id: 153 + - 149 + parent: 155 +- id: 154 kind: Ident span: 1:267-273 ident: !Ident - this - street targets: - - 149 - parent: 154 -- id: 154 + - 150 + parent: 155 +- id: 155 kind: Tuple span: 1:260-274 children: - - 152 - 153 - parent: 195 -- id: 179 + - 154 + parent: 196 +- id: 180 kind: RqOperator span: 1:296-323 alias: total targets: - - 181 - 182 - parent: 183 -- id: 181 + - 183 + parent: 184 +- id: 182 kind: Ident span: 1:296-309 ident: !Ident @@ -459,8 +459,8 @@ nodes: - ii - unit_price targets: - - 138 -- id: 182 + - 139 +- id: 183 kind: Ident span: 1:312-323 ident: !Ident @@ -468,28 +468,28 @@ nodes: - ii - quantity targets: - - 138 -- id: 183 + - 139 +- id: 184 kind: Tuple span: 1:296-323 children: - - 179 - parent: 184 -- id: 184 + - 180 + parent: 185 +- id: 185 kind: 'TransformCall: Derive' span: 1:281-323 children: - - 151 - - 183 - parent: 195 -- id: 185 + - 152 + - 184 + parent: 196 +- id: 186 kind: RqOperator span: 1:361-388 alias: num_orders targets: - - 187 - parent: 194 -- id: 187 + - 188 + parent: 195 +- id: 188 kind: Ident span: 1:376-388 ident: !Ident @@ -497,15 +497,15 @@ nodes: - i - invoice_id targets: - - 141 -- id: 188 + - 142 +- id: 189 kind: RqOperator span: 1:411-426 alias: num_tracks targets: - - 190 - parent: 194 -- id: 190 + - 191 + parent: 195 +- id: 191 kind: Ident span: 1:415-426 ident: !Ident @@ -513,229 +513,229 @@ nodes: - ii - quantity targets: - - 138 -- id: 191 + - 139 +- id: 192 kind: RqOperator span: 1:450-459 alias: total_price targets: - - 193 - parent: 194 -- id: 193 + - 194 + parent: 195 +- id: 194 kind: Ident span: 1:454-459 ident: !Ident - this - total targets: - - 179 -- id: 194 + - 180 +- id: 195 kind: Tuple span: 1:338-466 children: - - 185 - - 188 - - 191 - parent: 195 -- id: 195 + - 186 + - 189 + - 192 + parent: 196 +- id: 196 kind: 'TransformCall: Aggregate' span: 1:328-466 children: - - 184 - - 194 - - 154 - parent: 248 -- id: 198 + - 185 + - 195 + - 155 + parent: 249 +- id: 199 kind: Ident span: 1:476-480 ident: !Ident - this - city targets: - - 152 - parent: 199 -- id: 199 + - 153 + parent: 200 +- id: 200 kind: Tuple span: 1:475-481 children: - - 198 -- id: 223 + - 199 +- id: 224 kind: Ident span: 1:493-499 ident: !Ident - this - street targets: - - 153 -- id: 244 + - 154 +- id: 245 kind: RqOperator span: 1:571-585 alias: running_total_num_tracks targets: - - 246 - parent: 247 -- id: 246 + - 247 + parent: 248 +- id: 247 kind: Ident span: 1:575-585 ident: !Ident - this - num_tracks targets: - - 188 -- id: 247 + - 189 +- id: 248 kind: Tuple span: 1:543-586 children: - - 244 - parent: 248 -- id: 248 + - 245 + parent: 249 +- id: 249 kind: 'TransformCall: Derive' span: 1:536-586 children: - - 195 - - 247 - parent: 257 -- id: 250 + - 196 + - 248 + parent: 258 +- id: 251 kind: Literal -- id: 254 +- id: 255 kind: Ident span: 1:601-605 ident: !Ident - this - city targets: - - 198 - parent: 257 -- id: 255 + - 199 + parent: 258 +- id: 256 kind: Ident span: 1:607-613 ident: !Ident - this - street targets: - - 153 - parent: 257 -- id: 257 + - 154 + parent: 258 +- id: 258 kind: 'TransformCall: Sort' span: 1:595-614 children: - - 248 - - 254 + - 249 - 255 - parent: 263 -- id: 258 + - 256 + parent: 264 +- id: 259 kind: RqOperator span: 1:646-662 alias: num_tracks_last_week targets: - - 260 - 261 - parent: 262 -- id: 260 + - 262 + parent: 263 +- id: 261 kind: Literal span: 1:650-651 -- id: 261 +- id: 262 kind: Ident span: 1:652-662 ident: !Ident - this - num_tracks targets: - - 188 -- id: 262 + - 189 +- id: 263 kind: Tuple span: 1:622-663 children: - - 258 - parent: 263 -- id: 263 + - 259 + parent: 264 +- id: 264 kind: 'TransformCall: Derive' span: 1:615-663 children: - - 257 - - 262 - parent: 271 -- id: 264 + - 258 + - 263 + parent: 272 +- id: 265 kind: Ident span: 1:677-681 ident: !Ident - this - city targets: - - 198 - parent: 270 -- id: 265 + - 199 + parent: 271 +- id: 266 kind: Ident span: 1:687-693 ident: !Ident - this - street targets: - - 153 - parent: 270 -- id: 266 + - 154 + parent: 271 +- id: 267 kind: Ident span: 1:699-709 ident: !Ident - this - num_orders targets: - - 185 - parent: 270 -- id: 267 + - 186 + parent: 271 +- id: 268 kind: Ident span: 1:715-725 ident: !Ident - this - num_tracks targets: - - 188 - parent: 270 -- id: 268 + - 189 + parent: 271 +- id: 269 kind: Ident span: 1:731-755 ident: !Ident - this - running_total_num_tracks targets: - - 244 - parent: 270 -- id: 269 + - 245 + parent: 271 +- id: 270 kind: Ident span: 1:761-781 ident: !Ident - this - num_tracks_last_week targets: - - 258 - parent: 270 -- id: 270 + - 259 + parent: 271 +- id: 271 kind: Tuple span: 1:671-783 children: - - 264 - 265 - 266 - 267 - 268 - 269 - parent: 271 -- id: 271 + - 270 + parent: 272 +- id: 272 kind: 'TransformCall: Select' span: 1:664-783 children: - - 263 - - 270 - parent: 273 -- id: 273 + - 264 + - 271 + parent: 274 +- id: 274 kind: 'TransformCall: Take' span: 1:784-791 children: - - 271 - - 274 -- id: 274 + - 272 + - 275 +- id: 275 kind: Literal - parent: 273 + parent: 274 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 80bf9acf1e88..5199bec4db04 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: 132 + target_id: 133 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:200-212 - columns: - !Single name: - n - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:215-231 - columns: - !Single name: - n - target_id: 155 + target_id: 156 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:194-232 - columns: - !Single name: - n - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:233-249 - columns: - !Single name: - n - target_id: 163 + target_id: 164 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 - - 1:250-256 - columns: - !Single name: - n - target_id: 163 + target_id: 164 target_name: null inputs: - - id: 128 - name: _literal_128 + - id: 129 + name: _literal_129 table: - default_db - - _literal_128 + - _literal_129 nodes: -- id: 128 +- id: 129 kind: Array span: 1:162-176 children: - - 129 - parent: 137 -- id: 129 + - 130 + parent: 138 +- id: 130 kind: Tuple span: 1:168-175 children: - - 130 - parent: 128 -- id: 130 + - 131 + parent: 129 +- id: 131 kind: Literal span: 1:173-174 alias: n - parent: 129 -- id: 132 + parent: 130 +- id: 133 kind: RqOperator span: 1:188-193 alias: n targets: - - 134 - 135 - parent: 136 -- id: 134 + - 136 + parent: 137 +- id: 135 kind: Ident span: 1:188-189 ident: !Ident - this - - _literal_128 + - _literal_129 - n targets: - - 128 -- id: 135 + - 129 +- id: 136 kind: Literal span: 1:192-193 -- id: 136 +- id: 137 kind: Tuple span: 1:188-193 children: - - 132 - parent: 137 -- id: 137 + - 133 + parent: 138 +- id: 138 kind: 'TransformCall: Select' span: 1:177-193 children: - - 128 - - 136 - parent: 161 -- id: 146 + - 129 + - 137 + parent: 162 +- id: 147 kind: Ident ident: !Ident - _param - _tbl targets: - - 143 - parent: 154 -- id: 150 + - 144 + parent: 155 +- id: 151 kind: RqOperator span: 1:207-212 targets: - - 152 - 153 - parent: 154 -- id: 152 + - 154 + parent: 155 +- id: 153 kind: Ident span: 1:207-208 ident: !Ident - this - n targets: - - 132 -- id: 153 + - 133 +- id: 154 kind: Literal span: 1:211-212 -- id: 154 +- id: 155 kind: 'TransformCall: Filter' span: 1:200-212 children: - - 146 - - 150 - parent: 160 -- id: 155 + - 147 + - 151 + parent: 161 +- id: 156 kind: RqOperator span: 1:226-231 alias: n targets: - - 157 - 158 - parent: 159 -- id: 157 + - 159 + parent: 160 +- id: 158 kind: Ident span: 1:226-227 ident: !Ident - this - n targets: - - 132 -- id: 158 + - 133 +- id: 159 kind: Literal span: 1:230-231 -- id: 159 +- id: 160 kind: Tuple span: 1:226-231 children: - - 155 - parent: 160 -- id: 160 + - 156 + parent: 161 +- id: 161 kind: 'TransformCall: Select' span: 1:215-231 children: - - 154 - - 159 -- id: 161 + - 155 + - 160 +- id: 162 kind: 'TransformCall: Loop' span: 1:194-232 children: - - 137 - - 162 - parent: 168 -- id: 162 + - 138 + - 163 + parent: 169 +- id: 163 kind: Func span: 1:215-231 - parent: 161 -- id: 163 + parent: 162 +- id: 164 kind: RqOperator span: 1:244-249 alias: n targets: - - 165 - 166 - parent: 167 -- id: 165 + - 167 + parent: 168 +- id: 166 kind: Ident span: 1:244-245 ident: !Ident - this - n targets: - - 132 -- id: 166 + - 133 +- id: 167 kind: Literal span: 1:248-249 -- id: 167 +- id: 168 kind: Tuple span: 1:244-249 children: - - 163 - parent: 168 -- id: 168 + - 164 + parent: 169 +- id: 169 kind: 'TransformCall: Select' span: 1:233-249 children: - - 161 - - 167 - parent: 171 -- id: 169 + - 162 + - 168 + parent: 172 +- id: 170 kind: Ident span: 1:255-256 ident: !Ident - this - n targets: - - 163 - parent: 171 -- id: 171 + - 164 + parent: 172 +- id: 172 kind: 'TransformCall: Sort' span: 1:250-256 children: - - 168 - 169 + - 170 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 0740c403892a..94bbe523c811 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: 122 + input_id: 123 except: [] inputs: - - id: 122 + - id: 123 name: invoices table: - default_db @@ -20,109 +20,109 @@ frames: - !Single name: - total_original - target_id: 127 + target_id: 128 target_name: null - !Single name: - total_x - target_id: 132 + target_id: 133 target_name: null - !Single name: - total_floor - target_id: 143 + target_id: 144 target_name: null - !Single name: - total_ceil - target_id: 146 + target_id: 147 target_name: null - !Single name: - total_log10 - target_id: 149 + target_id: 150 target_name: null - !Single name: - total_log2 - target_id: 156 + target_id: 157 target_name: null - !Single name: - total_sqrt - target_id: 164 + target_id: 165 target_name: null - !Single name: - total_ln - target_id: 171 + target_id: 172 target_name: null - !Single name: - total_cos - target_id: 180 + target_id: 181 target_name: null - !Single name: - total_sin - target_id: 189 + target_id: 190 target_name: null - !Single name: - total_tan - target_id: 198 + target_id: 199 target_name: null - !Single name: - total_deg - target_id: 207 + target_id: 208 target_name: null - !Single name: - total_square - target_id: 216 + target_id: 217 target_name: null - !Single name: - total_square_op - target_id: 225 + target_id: 226 target_name: null inputs: - - id: 122 + - id: 123 name: invoices table: - default_db - invoices nodes: -- id: 122 +- id: 123 kind: Ident span: 1:82-95 ident: !Ident - default_db - invoices - parent: 125 -- id: 125 + parent: 126 +- id: 126 kind: 'TransformCall: Take' span: 1:96-102 children: - - 122 - - 126 - parent: 234 -- id: 126 - kind: Literal - parent: 125 + - 123 + - 127 + parent: 235 - id: 127 + kind: Literal + parent: 126 +- id: 128 kind: RqOperator span: 1:142-154 alias: total_original targets: - - 130 - 131 - parent: 233 -- id: 130 + - 132 + parent: 234 +- id: 131 kind: Literal span: 1:153-154 -- id: 131 +- id: 132 kind: Ident span: 1:134-139 ident: !Ident @@ -130,33 +130,33 @@ nodes: - invoices - total targets: - - 122 -- id: 132 + - 123 +- id: 133 kind: RqOperator span: 1:205-213 alias: total_x targets: - - 134 - parent: 233 -- id: 134 + - 135 + parent: 234 +- id: 135 kind: RqOperator span: 1:190-202 targets: - - 137 - 138 -- id: 137 + - 139 +- id: 138 kind: Literal span: 1:201-202 -- id: 138 +- id: 139 kind: RqOperator span: 1:172-187 targets: - - 141 - 142 -- id: 141 + - 143 +- id: 142 kind: RqOperator span: 1:172-179 -- id: 142 +- id: 143 kind: Ident span: 1:182-187 ident: !Ident @@ -164,15 +164,15 @@ nodes: - invoices - total targets: - - 122 -- id: 143 + - 123 +- id: 144 kind: RqOperator span: 1:234-252 alias: total_floor targets: - - 145 - parent: 233 -- id: 145 + - 146 + parent: 234 +- id: 146 kind: Ident span: 1:246-251 ident: !Ident @@ -180,15 +180,15 @@ nodes: - invoices - total targets: - - 122 -- id: 146 + - 123 +- id: 147 kind: RqOperator span: 1:271-288 alias: total_ceil targets: - - 148 - parent: 233 -- id: 148 + - 149 + parent: 234 +- id: 149 kind: Ident span: 1:282-287 ident: !Ident @@ -196,24 +196,24 @@ nodes: - invoices - total targets: - - 122 -- id: 149 + - 123 +- id: 150 kind: RqOperator span: 1:328-340 alias: total_log10 targets: - - 152 - 153 - parent: 233 -- id: 152 + - 154 + parent: 234 +- id: 153 kind: Literal span: 1:339-340 -- id: 153 +- id: 154 kind: RqOperator span: 1:309-325 targets: - - 155 -- id: 155 + - 156 +- id: 156 kind: Ident span: 1:320-325 ident: !Ident @@ -221,28 +221,28 @@ nodes: - invoices - total targets: - - 122 -- id: 156 + - 123 +- id: 157 kind: RqOperator span: 1:380-392 alias: total_log2 targets: - - 159 - 160 - parent: 233 -- id: 159 + - 161 + parent: 234 +- id: 160 kind: Literal span: 1:391-392 -- id: 160 +- id: 161 kind: RqOperator span: 1:361-377 targets: - - 162 - 163 -- id: 162 + - 164 +- id: 163 kind: Literal span: 1:370-371 -- id: 163 +- id: 164 kind: Ident span: 1:372-377 ident: !Ident @@ -250,24 +250,24 @@ nodes: - invoices - total targets: - - 122 -- id: 164 + - 123 +- id: 165 kind: RqOperator span: 1:431-443 alias: total_sqrt targets: - - 167 - 168 - parent: 233 -- id: 167 + - 169 + parent: 234 +- id: 168 kind: Literal span: 1:442-443 -- id: 168 +- id: 169 kind: RqOperator span: 1:413-428 targets: - - 170 -- id: 170 + - 171 +- id: 171 kind: Ident span: 1:423-428 ident: !Ident @@ -275,29 +275,29 @@ nodes: - invoices - total targets: - - 122 -- id: 171 + - 123 +- id: 172 kind: RqOperator span: 1:489-501 alias: total_ln targets: - - 174 - 175 - parent: 233 -- id: 174 + - 176 + parent: 234 +- id: 175 kind: Literal span: 1:500-501 -- id: 175 +- id: 176 kind: RqOperator span: 1:478-486 targets: - - 177 -- id: 177 + - 178 +- id: 178 kind: RqOperator span: 1:462-475 targets: - - 179 -- id: 179 + - 180 +- id: 180 kind: Ident span: 1:470-475 ident: !Ident @@ -305,29 +305,29 @@ nodes: - invoices - total targets: - - 122 -- id: 180 + - 123 +- id: 181 kind: RqOperator span: 1:550-562 alias: total_cos targets: - - 183 - 184 - parent: 233 -- id: 183 + - 185 + parent: 234 +- id: 184 kind: Literal span: 1:561-562 -- id: 184 +- id: 185 kind: RqOperator span: 1:538-547 targets: - - 186 -- id: 186 + - 187 +- id: 187 kind: RqOperator span: 1:521-535 targets: - - 188 -- id: 188 + - 189 +- id: 189 kind: Ident span: 1:530-535 ident: !Ident @@ -335,29 +335,29 @@ nodes: - invoices - total targets: - - 122 -- id: 189 + - 123 +- id: 190 kind: RqOperator span: 1:611-623 alias: total_sin targets: - - 192 - 193 - parent: 233 -- id: 192 + - 194 + parent: 234 +- id: 193 kind: Literal span: 1:622-623 -- id: 193 +- id: 194 kind: RqOperator span: 1:599-608 targets: - - 195 -- id: 195 + - 196 +- id: 196 kind: RqOperator span: 1:582-596 targets: - - 197 -- id: 197 + - 198 +- id: 198 kind: Ident span: 1:591-596 ident: !Ident @@ -365,29 +365,29 @@ nodes: - invoices - total targets: - - 122 -- id: 198 + - 123 +- id: 199 kind: RqOperator span: 1:672-684 alias: total_tan targets: - - 201 - 202 - parent: 233 -- id: 201 + - 203 + parent: 234 +- id: 202 kind: Literal span: 1:683-684 -- id: 202 +- id: 203 kind: RqOperator span: 1:660-669 targets: - - 204 -- id: 204 + - 205 +- id: 205 kind: RqOperator span: 1:643-657 targets: - - 206 -- id: 206 + - 207 +- id: 207 kind: Ident span: 1:652-657 ident: !Ident @@ -395,29 +395,29 @@ nodes: - invoices - total targets: - - 122 -- id: 207 + - 123 +- id: 208 kind: RqOperator span: 1:742-754 alias: total_deg targets: - - 210 - 211 - parent: 233 -- id: 210 + - 212 + parent: 234 +- id: 211 kind: Literal span: 1:753-754 -- id: 211 +- id: 212 kind: RqOperator span: 1:727-739 targets: - - 213 -- id: 213 + - 214 +- id: 214 kind: RqOperator span: 1:712-724 targets: - - 215 -- id: 215 + - 216 +- id: 216 kind: Ident span: 1:704-709 ident: !Ident @@ -425,28 +425,28 @@ nodes: - invoices - total targets: - - 122 -- id: 216 + - 123 +- id: 217 kind: RqOperator span: 1:798-810 alias: total_square targets: - - 219 - 220 - parent: 233 -- id: 219 + - 221 + parent: 234 +- id: 220 kind: Literal span: 1:809-810 -- id: 220 +- id: 221 kind: RqOperator span: 1:785-795 targets: - - 223 - 224 -- id: 223 + - 225 +- id: 224 kind: Literal span: 1:794-795 -- id: 224 +- id: 225 kind: Ident span: 1:777-782 ident: !Ident @@ -454,28 +454,28 @@ nodes: - invoices - total targets: - - 122 -- id: 225 + - 123 +- id: 226 kind: RqOperator span: 1:851-863 alias: total_square_op targets: - - 228 - 229 - parent: 233 -- id: 228 + - 230 + parent: 234 +- id: 229 kind: Literal span: 1:862-863 -- id: 229 +- id: 230 kind: RqOperator span: 1:836-848 targets: - - 231 - 232 -- id: 231 + - 233 +- id: 232 kind: Literal span: 1:846-847 -- id: 232 +- id: 233 kind: Ident span: 1:837-842 ident: !Ident @@ -483,32 +483,32 @@ nodes: - invoices - total targets: - - 122 -- id: 233 + - 123 +- id: 234 kind: Tuple span: 1:110-867 children: - - 127 - - 132 - - 143 - - 146 - - 149 - - 156 - - 164 - - 171 - - 180 - - 189 - - 198 - - 207 - - 216 - - 225 - parent: 234 -- id: 234 + - 128 + - 133 + - 144 + - 147 + - 150 + - 157 + - 165 + - 172 + - 181 + - 190 + - 199 + - 208 + - 217 + - 226 + parent: 235 +- id: 235 kind: 'TransformCall: Select' span: 1:103-867 children: - - 125 - - 233 + - 126 + - 234 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 508352ae17e7..7f80c131a126 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: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:203-248 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -29,10 +29,10 @@ frames: - - 1:249-262 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -40,10 +40,10 @@ frames: - - 1:263-273 - columns: - !All - input_id: 131 + input_id: 132 except: [] inputs: - - id: 131 + - id: 132 name: tracks table: - default_db @@ -54,36 +54,36 @@ frames: name: - tracks - name - target_id: 165 + target_id: 166 target_name: null - !Single name: - tracks - composer - target_id: 166 + target_id: 167 target_name: null inputs: - - id: 131 + - id: 132 name: tracks table: - default_db - tracks nodes: -- id: 131 +- id: 132 kind: Ident span: 1:166-177 ident: !Ident - default_db - tracks - parent: 137 -- id: 133 + parent: 138 +- id: 134 kind: RqOperator span: 1:187-201 targets: - - 135 - 136 - parent: 137 -- id: 135 + - 137 + parent: 138 +- id: 136 kind: Ident span: 1:187-191 ident: !Ident @@ -91,38 +91,38 @@ nodes: - tracks - name targets: - - 131 -- id: 136 + - 132 +- id: 137 kind: Literal span: 1:195-201 -- id: 137 +- id: 138 kind: 'TransformCall: Filter' span: 1:179-202 children: - - 131 - - 133 - parent: 157 -- id: 141 + - 132 + - 134 + parent: 158 +- id: 142 kind: Literal span: 1:243-244 alias: start -- id: 142 +- id: 143 kind: Literal span: 1:246-247 alias: end -- id: 144 +- id: 145 kind: RqOperator span: 1:211-237 targets: - - 146 - - 150 -- id: 146 + - 147 + - 151 +- id: 147 kind: RqOperator span: 1:212-231 targets: - - 148 - 149 -- id: 148 + - 150 +- id: 149 kind: Ident span: 1:212-224 ident: !Ident @@ -130,38 +130,38 @@ nodes: - tracks - milliseconds targets: - - 131 -- id: 149 + - 132 +- id: 150 kind: Literal span: 1:227-231 -- id: 150 +- id: 151 kind: Literal span: 1:234-236 -- id: 151 +- id: 152 kind: RqOperator span: 1:240-247 targets: - - 153 - - 155 - parent: 157 -- id: 153 + - 154 + - 156 + parent: 158 +- id: 154 kind: RqOperator targets: - - 144 - - 141 -- id: 155 + - 145 + - 142 +- id: 156 kind: RqOperator targets: - - 144 - - 142 -- id: 157 + - 145 + - 143 +- id: 158 kind: 'TransformCall: Filter' span: 1:203-248 children: - - 137 - - 151 - parent: 160 -- id: 158 + - 138 + - 152 + parent: 161 +- id: 159 kind: Ident span: 1:254-262 ident: !Ident @@ -169,34 +169,34 @@ nodes: - tracks - track_id targets: - - 131 - parent: 160 -- id: 160 + - 132 + parent: 161 +- id: 161 kind: 'TransformCall: Sort' span: 1:249-262 children: - - 157 - 158 - parent: 164 -- id: 161 + - 159 + parent: 165 +- id: 162 kind: Literal span: 1:268-269 alias: start - parent: 164 -- id: 162 + parent: 165 +- id: 163 kind: Literal span: 1:271-273 alias: end - parent: 164 -- id: 164 + parent: 165 +- id: 165 kind: 'TransformCall: Take' span: 1:263-273 children: - - 160 - 161 - 162 - parent: 168 -- id: 165 + - 163 + parent: 169 +- id: 166 kind: Ident span: 1:282-286 ident: !Ident @@ -204,9 +204,9 @@ nodes: - tracks - name targets: - - 131 - parent: 167 -- id: 166 + - 132 + parent: 168 +- id: 167 kind: Ident span: 1:288-296 ident: !Ident @@ -214,21 +214,21 @@ nodes: - tracks - composer targets: - - 131 - parent: 167 -- id: 167 + - 132 + parent: 168 +- id: 168 kind: Tuple span: 1:281-297 children: - - 165 - 166 - parent: 168 -- id: 168 + - 167 + parent: 169 +- id: 169 kind: 'TransformCall: Select' span: 1:274-297 children: - - 164 - - 167 + - 165 + - 168 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 0f669456d723..69beb73578a9 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: 125 + input_id: 126 except: [] inputs: - - id: 125 - name: _literal_125 + - id: 126 + name: _literal_126 table: - default_db - - _literal_125 - - id: 120 - name: _literal_120 + - _literal_126 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 - - 1:145-163 - columns: - !All - input_id: 125 + input_id: 126 except: [] inputs: - - id: 125 - name: _literal_125 + - id: 126 + name: _literal_126 table: - default_db - - _literal_125 - - id: 120 - name: _literal_120 + - _literal_126 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 nodes: -- id: 120 +- id: 121 kind: RqOperator span: 1:100-143 targets: - - 122 - parent: 129 -- id: 122 + - 123 + parent: 130 +- id: 123 kind: Literal span: 1:110-143 -- id: 125 +- id: 126 kind: RqOperator span: 1:43-91 targets: - - 127 - parent: 129 -- id: 127 + - 128 + parent: 130 +- id: 128 kind: Literal span: 1:58-90 -- id: 129 +- id: 130 kind: 'TransformCall: Append' span: 1:92-144 children: - - 125 - - 120 - parent: 132 -- id: 130 + - 126 + - 121 + parent: 133 +- id: 131 kind: Ident span: 1:150-163 ident: !Ident - this - - _literal_125 + - _literal_126 - media_type_id targets: - - 125 - parent: 132 -- id: 132 + - 126 + parent: 133 +- id: 133 kind: 'TransformCall: Sort' span: 1:145-163 children: - - 129 - 130 + - 131 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 83eb1ffcf743..fb9f23d52aa5 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: 137 + target_id: 138 target_name: null inputs: - - id: 128 + - id: 129 name: t table: - default_db - - _literal_128 + - _literal_129 - - 0:3163-3240 - columns: - !Single name: - t - a - target_id: 137 + target_id: 138 target_name: null - !Single name: - b - a - target_id: 123 + target_id: 124 target_name: a inputs: - - id: 128 + - id: 129 name: t table: - default_db - - _literal_128 - - id: 123 + - _literal_129 + - id: 124 name: b table: - default_db - - _literal_123 + - _literal_124 - - 0:3243-3288 - columns: - !Single name: - t - a - target_id: 137 + target_id: 138 target_name: null - !Single name: - b - a - target_id: 123 + target_id: 124 target_name: a inputs: - - id: 128 + - id: 129 name: t table: - default_db - - _literal_128 - - id: 123 + - _literal_129 + - id: 124 name: b table: - default_db - - _literal_123 + - _literal_124 - - 1:165-238 - columns: - !Single name: - t - a - target_id: 208 + target_id: 209 target_name: null inputs: - - id: 128 + - id: 129 name: t table: - default_db - - _literal_128 - - id: 123 + - _literal_129 + - id: 124 name: b table: - default_db - - _literal_123 + - _literal_124 - - 1:239-245 - columns: - !Single name: - t - a - target_id: 208 + target_id: 209 target_name: null inputs: - - id: 128 + - id: 129 name: t table: - default_db - - _literal_128 - - id: 123 + - _literal_129 + - id: 124 name: b table: - default_db - - _literal_123 + - _literal_124 nodes: -- id: 123 +- id: 124 kind: Array span: 1:173-237 - parent: 190 -- id: 128 + parent: 191 +- id: 129 kind: Array span: 1:36-55 - parent: 155 -- id: 137 + parent: 156 +- id: 138 kind: Ident ident: !Ident - this - t - a targets: - - 128 - parent: 139 -- id: 139 + - 129 + parent: 140 +- id: 140 kind: Tuple span: 1:64-69 children: - - 137 -- id: 155 + - 138 +- id: 156 kind: 'TransformCall: Take' span: 1:71-77 children: - - 128 - - 156 - parent: 190 -- id: 156 + - 129 + - 157 + parent: 191 +- id: 157 kind: Literal - parent: 155 -- id: 179 + parent: 156 +- id: 180 kind: Ident ident: !Ident - this - t - a targets: - - 137 -- id: 182 + - 138 +- id: 183 kind: Ident ident: !Ident - that - b - a targets: - - 123 -- id: 188 + - 124 +- id: 189 kind: RqOperator span: 0:3192-3239 targets: - - 179 - - 182 - parent: 190 -- id: 190 + - 180 + - 183 + parent: 191 +- id: 191 kind: 'TransformCall: Join' span: 0:3163-3240 children: - - 155 - - 123 - - 188 - parent: 206 -- id: 198 + - 156 + - 124 + - 189 + parent: 207 +- id: 199 kind: Ident span: 0:5981-5989 ident: !Ident @@ -178,47 +178,47 @@ nodes: - b - a targets: - - 123 -- id: 202 + - 124 +- id: 203 kind: RqOperator span: 0:3251-3287 targets: - - 198 - - 205 - parent: 206 -- id: 205 + - 199 + - 206 + parent: 207 +- id: 206 kind: Literal span: 0:5993-5997 -- id: 206 +- id: 207 kind: 'TransformCall: Filter' span: 0:3243-3288 children: - - 190 - - 202 - parent: 210 -- id: 208 + - 191 + - 203 + parent: 211 +- id: 209 kind: Ident ident: !Ident - this - t - a targets: - - 137 - parent: 209 -- id: 209 + - 138 + parent: 210 +- id: 210 kind: Tuple span: 0:3298-3301 children: - - 208 - parent: 210 -- id: 210 + - 209 + parent: 211 +- id: 211 kind: 'TransformCall: Select' span: 1:165-238 children: - - 206 - - 209 - parent: 213 -- id: 211 + - 207 + - 210 + parent: 214 +- id: 212 kind: Ident span: 1:244-245 ident: !Ident @@ -226,14 +226,14 @@ nodes: - t - a targets: - - 208 - parent: 213 -- id: 213 + - 209 + parent: 214 +- id: 214 kind: 'TransformCall: Sort' span: 1:239-245 children: - - 210 - 211 + - 212 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 0c1a52ce8eeb..70eceb638ed9 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: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: e table: - default_db @@ -18,10 +18,10 @@ frames: - - 1:62-90 - columns: - !All - input_id: 129 + input_id: 130 except: [] inputs: - - id: 129 + - id: 130 name: e table: - default_db @@ -29,18 +29,18 @@ frames: - - 1:145-215 - columns: - !All - input_id: 129 + input_id: 130 except: [] - !All - input_id: 120 + input_id: 121 except: [] inputs: - - id: 129 + - id: 130 name: e table: - default_db - employees - - id: 120 + - id: 121 name: manager table: - default_db @@ -49,54 +49,54 @@ frames: - columns: - !Single name: null - target_id: 145 + target_id: 146 target_name: null - !Single name: - e - last_name - target_id: 146 + target_id: 147 target_name: null - !Single name: - manager - first_name - target_id: 147 + target_id: 148 target_name: null inputs: - - id: 129 + - id: 130 name: e table: - default_db - employees - - id: 120 + - id: 121 name: manager table: - default_db - employees nodes: -- id: 120 +- id: 121 kind: Ident span: 1:158-167 ident: !Ident - default_db - employees - parent: 144 -- id: 129 + parent: 145 +- id: 130 kind: Ident span: 1:13-29 ident: !Ident - default_db - employees - parent: 135 -- id: 131 + parent: 136 +- id: 132 kind: RqOperator span: 1:37-61 targets: - - 133 - 134 - parent: 135 -- id: 133 + - 135 + parent: 136 +- id: 134 kind: Ident span: 1:37-47 ident: !Ident @@ -104,18 +104,18 @@ nodes: - e - first_name targets: - - 129 -- id: 134 + - 130 +- id: 135 kind: Literal span: 1:51-61 -- id: 135 +- id: 136 kind: 'TransformCall: Filter' span: 1:30-61 children: - - 129 - - 131 - parent: 139 -- id: 136 + - 130 + - 132 + parent: 140 +- id: 137 kind: Ident span: 1:68-78 ident: !Ident @@ -123,9 +123,9 @@ nodes: - e - first_name targets: - - 129 - parent: 139 -- id: 137 + - 130 + parent: 140 +- id: 138 kind: Ident span: 1:80-89 ident: !Ident @@ -133,24 +133,24 @@ nodes: - e - last_name targets: - - 129 - parent: 139 -- id: 139 + - 130 + parent: 140 +- id: 140 kind: 'TransformCall: Sort' span: 1:62-90 children: - - 135 - 136 - 137 - parent: 144 -- id: 140 + - 138 + parent: 145 +- id: 141 kind: RqOperator span: 1:179-214 targets: - - 142 - 143 - parent: 144 -- id: 142 + - 144 + parent: 145 +- id: 143 kind: Ident span: 1:179-191 ident: !Ident @@ -158,8 +158,8 @@ nodes: - e - reports_to targets: - - 129 -- id: 143 + - 130 +- id: 144 kind: Ident span: 1:195-214 ident: !Ident @@ -167,16 +167,16 @@ nodes: - manager - employee_id targets: - - 120 -- id: 144 + - 121 +- id: 145 kind: 'TransformCall: Join' span: 1:145-215 children: - - 139 - - 120 - 140 - parent: 149 -- id: 145 + - 121 + - 141 + parent: 150 +- id: 146 kind: Ident span: 1:225-237 ident: !Ident @@ -184,9 +184,9 @@ nodes: - e - first_name targets: - - 129 - parent: 148 -- id: 146 + - 130 + parent: 149 +- id: 147 kind: Ident span: 1:239-250 ident: !Ident @@ -194,9 +194,9 @@ nodes: - e - last_name targets: - - 129 - parent: 148 -- id: 147 + - 130 + parent: 149 +- id: 148 kind: Ident span: 1:252-270 ident: !Ident @@ -204,22 +204,22 @@ nodes: - manager - first_name targets: - - 120 - parent: 148 -- id: 148 + - 121 + parent: 149 +- id: 149 kind: Tuple span: 1:224-271 children: - - 145 - 146 - 147 - parent: 149 -- id: 149 + - 148 + parent: 150 +- id: 150 kind: 'TransformCall: Select' span: 1:217-271 children: - - 144 - - 148 + - 145 + - 149 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 77b8eb37d108..ad7987290020 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: 131 + target_id: 132 target_name: null - !Single name: - albums - artist_id - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 129 + - id: 130 name: albums table: - default_db @@ -28,16 +28,16 @@ frames: - !Single name: - AA - target_id: 131 + target_id: 132 target_name: null - !Single name: - albums - artist_id - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 129 + - id: 130 name: albums table: - default_db @@ -47,16 +47,16 @@ frames: - !Single name: - AA - target_id: 131 + target_id: 132 target_name: null - !Single name: - albums - artist_id - target_id: 132 + target_id: 133 target_name: null inputs: - - id: 129 + - id: 130 name: albums table: - default_db @@ -66,44 +66,44 @@ frames: - !Single name: - AA - target_id: 131 + target_id: 132 target_name: null - !Single name: - albums - artist_id - target_id: 132 + target_id: 133 target_name: null - !All - input_id: 117 + input_id: 118 except: [] inputs: - - id: 129 + - id: 130 name: albums table: - default_db - albums - - id: 117 + - id: 118 name: artists table: - default_db - artists nodes: -- id: 117 +- id: 118 kind: Ident span: 1:75-82 ident: !Ident - default_db - artists - parent: 147 -- id: 129 + parent: 148 +- id: 130 kind: Ident span: 1:0-11 ident: !Ident - default_db - albums - parent: 134 -- id: 131 + parent: 135 +- id: 132 kind: Ident span: 1:24-32 alias: AA @@ -112,9 +112,9 @@ nodes: - albums - album_id targets: - - 129 - parent: 133 -- id: 132 + - 130 + parent: 134 +- id: 133 kind: Ident span: 1:34-43 ident: !Ident @@ -122,71 +122,71 @@ nodes: - albums - artist_id targets: - - 129 - parent: 133 -- id: 133 + - 130 + parent: 134 +- id: 134 kind: Tuple span: 1:19-45 children: - - 131 - 132 - parent: 134 -- id: 134 + - 133 + parent: 135 +- id: 135 kind: 'TransformCall: Select' span: 1:12-45 children: - - 129 - - 133 - parent: 137 -- id: 135 + - 130 + - 134 + parent: 138 +- id: 136 kind: Ident span: 1:51-53 ident: !Ident - this - AA targets: - - 131 - parent: 137 -- id: 137 + - 132 + parent: 138 +- id: 138 kind: 'TransformCall: Sort' span: 1:46-53 children: - - 134 - 135 - parent: 142 -- id: 138 + - 136 + parent: 143 +- id: 139 kind: RqOperator span: 1:61-69 targets: - - 140 - 141 - parent: 142 -- id: 140 + - 142 + parent: 143 +- id: 141 kind: Ident span: 1:61-63 ident: !Ident - this - AA targets: - - 131 -- id: 141 + - 132 +- id: 142 kind: Literal span: 1:67-69 -- id: 142 +- id: 143 kind: 'TransformCall: Filter' span: 1:54-69 children: - - 137 - 138 - parent: 147 -- id: 143 + - 139 + parent: 148 +- id: 144 kind: RqOperator span: 1:84-95 targets: - - 145 - 146 - parent: 147 -- id: 145 + - 147 + parent: 148 +- id: 146 kind: Ident span: 1:86-95 ident: !Ident @@ -194,8 +194,8 @@ nodes: - albums - artist_id targets: - - 132 -- id: 146 + - 133 +- id: 147 kind: Ident span: 1:86-95 ident: !Ident @@ -203,14 +203,14 @@ nodes: - artists - artist_id targets: - - 117 -- id: 147 + - 118 +- id: 148 kind: 'TransformCall: Join' span: 1:70-96 children: - - 142 - - 117 - 143 + - 118 + - 144 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 0cae4becbb36..60ed2f833b50 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: 151 + target_id: 152 target_name: null - !Single name: - - _literal_145 + - _literal_146 - album_id - target_id: 152 + target_id: 153 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 + - _literal_146 - - 1:87-94 - columns: - !Single name: - AA - target_id: 151 + target_id: 152 target_name: null - !Single name: - - _literal_145 + - _literal_146 - album_id - target_id: 152 + target_id: 153 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 153 + target_id: 154 target_name: null inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 + - _literal_146 - - 1:95-158 - columns: - !Single name: - AA - target_id: 151 + target_id: 152 target_name: null - !Single name: - - _literal_145 + - _literal_146 - album_id - target_id: 152 + target_id: 153 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 153 + target_id: 154 target_name: null - !Single name: - - _literal_133 + - _literal_134 - album_id - target_id: 133 + target_id: 134 target_name: album_id - !Single name: - - _literal_133 + - _literal_134 - album_title - target_id: 133 + target_id: 134 target_name: album_title inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 - - id: 133 - name: _literal_133 + - _literal_146 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:159-213 - columns: - !Single name: - AA - target_id: 164 + target_id: 165 target_name: null - !Single name: - AT - target_id: 165 + target_id: 166 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 - - id: 133 - name: _literal_133 + - _literal_146 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:214-228 - columns: - !Single name: - AA - target_id: 164 + target_id: 165 target_name: null - !Single name: - AT - target_id: 165 + target_id: 166 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 169 + target_id: 170 target_name: null inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 - - id: 133 - name: _literal_133 + - _literal_146 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 + - _literal_134 - - 1:229-291 - columns: - !Single name: - AA - target_id: 164 + target_id: 165 target_name: null - !Single name: - AT - target_id: 165 + target_id: 166 target_name: null - !Single name: - - _literal_145 + - _literal_146 - genre_id - target_id: 169 + target_id: 170 target_name: null - !Single name: - - _literal_120 + - _literal_121 - genre_id - target_id: 120 + target_id: 121 target_name: genre_id - !Single name: - - _literal_120 + - _literal_121 - genre_title - target_id: 120 + target_id: 121 target_name: genre_title inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 - - id: 133 - name: _literal_133 + - _literal_146 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 - - id: 120 - name: _literal_120 + - _literal_134 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 - - 1:292-340 - columns: - !Single name: - AA - target_id: 182 + target_id: 183 target_name: null - !Single name: - AT - target_id: 183 + target_id: 184 target_name: null - !Single name: - GT - target_id: 184 + target_id: 185 target_name: null inputs: - - id: 145 - name: _literal_145 + - id: 146 + name: _literal_146 table: - default_db - - _literal_145 - - id: 133 - name: _literal_133 + - _literal_146 + - id: 134 + name: _literal_134 table: - default_db - - _literal_133 - - id: 120 - name: _literal_120 + - _literal_134 + - id: 121 + name: _literal_121 table: - default_db - - _literal_120 + - _literal_121 nodes: -- id: 120 +- id: 121 kind: Array span: 1:244-278 children: - - 121 - parent: 181 -- id: 121 + - 122 + parent: 182 +- id: 122 kind: Tuple span: 1:245-277 children: - - 122 - 123 - parent: 120 -- id: 122 + - 124 + parent: 121 +- id: 123 kind: Literal span: 1:255-256 alias: genre_id - parent: 121 -- id: 123 + parent: 122 +- id: 124 kind: Literal span: 1:270-276 alias: genre_title - parent: 121 -- id: 133 + parent: 122 +- id: 134 kind: Array span: 1:110-145 children: - - 134 - parent: 163 -- id: 134 + - 135 + parent: 164 +- id: 135 kind: Tuple span: 1:111-144 children: - - 135 - 136 - parent: 133 -- id: 135 + - 137 + parent: 134 +- id: 136 kind: Literal span: 1:121-122 alias: album_id - parent: 134 -- id: 136 + parent: 135 +- id: 137 kind: Literal span: 1:136-143 alias: album_title - parent: 134 -- id: 145 + parent: 135 +- id: 146 kind: Array span: 1:0-43 children: - - 146 - parent: 155 -- id: 146 + - 147 + parent: 156 +- id: 147 kind: Tuple span: 1:6-42 children: - - 147 - 148 - 149 - parent: 145 -- id: 147 + - 150 + parent: 146 +- id: 148 kind: Literal span: 1:16-17 alias: track_id - parent: 146 -- id: 148 + parent: 147 +- id: 149 kind: Literal span: 1:28-29 alias: album_id - parent: 146 -- id: 149 + parent: 147 +- id: 150 kind: Literal span: 1:40-41 alias: genre_id - parent: 146 -- id: 151 + parent: 147 +- id: 152 kind: Ident span: 1:56-64 alias: AA ident: !Ident - this - - _literal_145 + - _literal_146 - track_id targets: - - 145 - parent: 154 -- id: 152 + - 146 + parent: 155 +- id: 153 kind: Ident span: 1:66-74 ident: !Ident - this - - _literal_145 + - _literal_146 - album_id targets: - - 145 - parent: 154 -- id: 153 + - 146 + parent: 155 +- id: 154 kind: Ident span: 1:76-84 ident: !Ident - this - - _literal_145 + - _literal_146 - genre_id targets: - - 145 - parent: 154 -- id: 154 + - 146 + parent: 155 +- id: 155 kind: Tuple span: 1:51-86 children: - - 151 - 152 - 153 - parent: 155 -- id: 155 + - 154 + parent: 156 +- id: 156 kind: 'TransformCall: Select' span: 1:44-86 children: - - 145 - - 154 - parent: 158 -- id: 156 + - 146 + - 155 + parent: 159 +- id: 157 kind: Ident span: 1:92-94 ident: !Ident - this - AA targets: - - 151 - parent: 158 -- id: 158 + - 152 + parent: 159 +- id: 159 kind: 'TransformCall: Sort' span: 1:87-94 children: - - 155 - 156 - parent: 163 -- id: 159 + - 157 + parent: 164 +- id: 160 kind: RqOperator span: 1:147-157 targets: - - 161 - 162 - parent: 163 -- id: 161 + - 163 + parent: 164 +- id: 162 kind: Ident span: 1:149-157 ident: !Ident - this - - _literal_145 + - _literal_146 - album_id targets: - - 152 -- id: 162 + - 153 +- id: 163 kind: Ident span: 1:149-157 ident: !Ident - that - - _literal_133 + - _literal_134 - album_id targets: - - 133 -- id: 163 + - 134 +- id: 164 kind: 'TransformCall: Join' span: 1:95-158 children: - - 158 - - 133 - 159 - parent: 171 -- id: 164 + - 134 + - 160 + parent: 172 +- id: 165 kind: Ident span: 1:168-170 ident: !Ident - this - AA targets: - - 151 - parent: 170 -- id: 165 + - 152 + parent: 171 +- id: 166 kind: RqOperator span: 1:177-201 alias: AT targets: - - 167 - 168 - parent: 170 -- id: 167 + - 169 + parent: 171 +- id: 168 kind: Ident span: 1:177-188 ident: !Ident - this - - _literal_133 + - _literal_134 - album_title targets: - - 133 -- id: 168 + - 134 +- id: 169 kind: Literal span: 1:192-201 -- id: 169 +- id: 170 kind: Ident span: 1:203-211 ident: !Ident - this - - _literal_145 + - _literal_146 - genre_id targets: - - 153 - parent: 170 -- id: 170 + - 154 + parent: 171 +- id: 171 kind: Tuple span: 1:166-213 children: - - 164 - 165 - - 169 - parent: 171 -- id: 171 + - 166 + - 170 + parent: 172 +- id: 172 kind: 'TransformCall: Select' span: 1:159-213 children: - - 163 - - 170 - parent: 176 -- id: 172 + - 164 + - 171 + parent: 177 +- id: 173 kind: RqOperator span: 1:221-228 targets: - - 174 - 175 - parent: 176 -- id: 174 + - 176 + parent: 177 +- id: 175 kind: Ident span: 1:221-223 ident: !Ident - this - AA targets: - - 164 -- id: 175 + - 165 +- id: 176 kind: Literal span: 1:226-228 -- id: 176 +- id: 177 kind: 'TransformCall: Filter' span: 1:214-228 children: - - 171 - 172 - parent: 181 -- id: 177 + - 173 + parent: 182 +- id: 178 kind: RqOperator span: 1:280-290 targets: - - 179 - 180 - parent: 181 -- id: 179 + - 181 + parent: 182 +- id: 180 kind: Ident span: 1:282-290 ident: !Ident - this - - _literal_145 + - _literal_146 - genre_id targets: - - 169 -- id: 180 + - 170 +- id: 181 kind: Ident span: 1:282-290 ident: !Ident - that - - _literal_120 + - _literal_121 - genre_id targets: - - 120 -- id: 181 + - 121 +- id: 182 kind: 'TransformCall: Join' span: 1:229-291 children: - - 176 - - 120 - 177 - parent: 189 -- id: 182 + - 121 + - 178 + parent: 190 +- id: 183 kind: Ident span: 1:301-303 ident: !Ident - this - AA targets: - - 164 - parent: 188 -- id: 183 + - 165 + parent: 189 +- id: 184 kind: Ident span: 1:305-307 ident: !Ident - this - AT targets: - - 165 - parent: 188 -- id: 184 + - 166 + parent: 189 +- id: 185 kind: RqOperator span: 1:314-338 alias: GT targets: - - 186 - 187 - parent: 188 -- id: 186 + - 188 + parent: 189 +- id: 187 kind: Ident span: 1:314-325 ident: !Ident - this - - _literal_120 + - _literal_121 - genre_title targets: - - 120 -- id: 187 + - 121 +- id: 188 kind: Literal span: 1:329-338 -- id: 188 +- id: 189 kind: Tuple span: 1:299-340 children: - - 182 - 183 - 184 - parent: 189 -- id: 189 + - 185 + parent: 190 +- id: 190 kind: 'TransformCall: Select' span: 1:292-340 children: - - 181 - - 188 + - 182 + - 189 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 f7b776b68213..e872d87512b2 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: 125 + input_id: 126 except: [] inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -20,10 +20,10 @@ frames: - !Single name: - display - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db @@ -33,23 +33,23 @@ frames: - !Single name: - display - target_id: 130 + target_id: 131 target_name: null inputs: - - id: 125 + - id: 126 name: tracks table: - default_db - tracks nodes: -- id: 125 +- id: 126 kind: Ident span: 1:89-100 ident: !Ident - default_db - tracks - parent: 129 -- id: 127 + parent: 130 +- id: 128 kind: Ident span: 1:106-118 ident: !Ident @@ -57,34 +57,34 @@ nodes: - tracks - milliseconds targets: - - 125 - parent: 129 -- id: 129 + - 126 + parent: 130 +- id: 130 kind: 'TransformCall: Sort' span: 1:101-118 children: - - 125 - - 127 - parent: 144 -- id: 130 + - 126 + - 128 + parent: 145 +- id: 131 kind: Case span: 1:136-246 alias: display targets: - - 131 - - 135 + - 132 - 136 - - 140 + - 137 - 141 - 142 - parent: 143 -- id: 131 + - 143 + parent: 144 +- id: 132 kind: RqOperator span: 1:147-163 targets: - - 133 - 134 -- id: 133 + - 135 +- id: 134 kind: Ident span: 1:147-155 ident: !Ident @@ -92,11 +92,11 @@ nodes: - tracks - composer targets: - - 125 -- id: 134 + - 126 +- id: 135 kind: Literal span: 1:159-163 -- id: 135 +- id: 136 kind: Ident span: 1:167-175 ident: !Ident @@ -104,14 +104,14 @@ nodes: - tracks - composer targets: - - 125 -- id: 136 + - 126 +- id: 137 kind: RqOperator span: 1:181-194 targets: - - 138 - 139 -- id: 138 + - 140 +- id: 139 kind: Ident span: 1:181-189 ident: !Ident @@ -119,41 +119,41 @@ nodes: - tracks - genre_id targets: - - 125 -- id: 139 + - 126 +- id: 140 kind: Literal span: 1:192-194 -- id: 140 +- id: 141 kind: Literal span: 1:198-211 -- id: 141 +- id: 142 kind: Literal span: 1:217-221 -- id: 142 +- id: 143 kind: FString span: 1:225-244 -- id: 143 +- id: 144 kind: Tuple span: 1:136-246 children: - - 130 - parent: 144 -- id: 144 + - 131 + parent: 145 +- id: 145 kind: 'TransformCall: Select' span: 1:119-246 children: - - 129 - - 143 - parent: 146 -- id: 146 + - 130 + - 144 + parent: 147 +- id: 147 kind: 'TransformCall: Take' span: 1:247-254 children: - - 144 - - 147 -- id: 147 + - 145 + - 148 +- id: 148 kind: Literal - parent: 146 + parent: 147 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 b5d9c38b15f9..ed65381e29a8 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: 122 + input_id: 123 except: [] inputs: - - id: 122 + - id: 123 name: tracks table: - default_db @@ -18,23 +18,23 @@ frames: - - 1:42-51 - columns: - !All - input_id: 122 + input_id: 123 except: [] inputs: - - id: 122 + - id: 123 name: tracks table: - default_db - tracks nodes: -- id: 122 +- id: 123 kind: Ident span: 1:13-24 ident: !Ident - default_db - tracks - parent: 126 -- id: 124 + parent: 127 +- id: 125 kind: Ident span: 1:31-40 ident: !Ident @@ -42,32 +42,32 @@ nodes: - tracks - track_id targets: - - 122 - parent: 126 -- id: 126 + - 123 + parent: 127 +- id: 127 kind: 'TransformCall: Sort' span: 1:25-41 children: - - 122 - - 124 - parent: 130 -- id: 127 + - 123 + - 125 + parent: 131 +- id: 128 kind: Literal span: 1:47-48 alias: start - parent: 130 -- id: 128 + parent: 131 +- id: 129 kind: Literal span: 1:50-51 alias: end - parent: 130 -- id: 130 + parent: 131 +- id: 131 kind: 'TransformCall: Take' span: 1:42-51 children: - - 126 - 127 - 128 + - 129 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 6dcf8ee3fde0..b448d0d52dd4 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: 127 + target_id: 128 target_name: null - !Single name: - title_and_spaces - target_id: 128 + target_id: 129 target_name: null - !Single name: - low - target_id: 130 + target_id: 131 target_name: null - !Single name: - up - target_id: 133 + target_id: 134 target_name: null - !Single name: - ltrimmed - target_id: 136 + target_id: 137 target_name: null - !Single name: - rtrimmed - target_id: 139 + target_id: 140 target_name: null - !Single name: - trimmed - target_id: 142 + target_id: 143 target_name: null - !Single name: - len - target_id: 145 + target_id: 146 target_name: null - !Single name: - subs - target_id: 148 + target_id: 149 target_name: null - !Single name: - replace - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 125 + - id: 126 name: albums table: - default_db @@ -69,55 +69,55 @@ frames: name: - albums - title - target_id: 127 + target_id: 128 target_name: null - !Single name: - title_and_spaces - target_id: 128 + target_id: 129 target_name: null - !Single name: - low - target_id: 130 + target_id: 131 target_name: null - !Single name: - up - target_id: 133 + target_id: 134 target_name: null - !Single name: - ltrimmed - target_id: 136 + target_id: 137 target_name: null - !Single name: - rtrimmed - target_id: 139 + target_id: 140 target_name: null - !Single name: - trimmed - target_id: 142 + target_id: 143 target_name: null - !Single name: - len - target_id: 145 + target_id: 146 target_name: null - !Single name: - subs - target_id: 148 + target_id: 149 target_name: null - !Single name: - replace - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 125 + - id: 126 name: albums table: - default_db @@ -128,68 +128,68 @@ frames: name: - albums - title - target_id: 127 + target_id: 128 target_name: null - !Single name: - title_and_spaces - target_id: 128 + target_id: 129 target_name: null - !Single name: - low - target_id: 130 + target_id: 131 target_name: null - !Single name: - up - target_id: 133 + target_id: 134 target_name: null - !Single name: - ltrimmed - target_id: 136 + target_id: 137 target_name: null - !Single name: - rtrimmed - target_id: 139 + target_id: 140 target_name: null - !Single name: - trimmed - target_id: 142 + target_id: 143 target_name: null - !Single name: - len - target_id: 145 + target_id: 146 target_name: null - !Single name: - subs - target_id: 148 + target_id: 149 target_name: null - !Single name: - replace - target_id: 154 + target_id: 155 target_name: null inputs: - - id: 125 + - id: 126 name: albums table: - default_db - albums nodes: -- id: 125 +- id: 126 kind: Ident span: 1:115-126 ident: !Ident - default_db - albums - parent: 161 -- id: 127 + parent: 162 +- id: 128 kind: Ident span: 1:140-145 ident: !Ident @@ -197,16 +197,16 @@ nodes: - albums - title targets: - - 125 - parent: 160 -- id: 128 + - 126 + parent: 161 +- id: 129 kind: FString span: 1:170-184 alias: title_and_spaces targets: - - 129 - parent: 160 -- id: 129 + - 130 + parent: 161 +- id: 130 kind: Ident span: 1:175-180 ident: !Ident @@ -214,15 +214,15 @@ nodes: - albums - title targets: - - 125 -- id: 130 + - 126 +- id: 131 kind: RqOperator span: 1:205-215 alias: low targets: - - 132 - parent: 160 -- id: 132 + - 133 + parent: 161 +- id: 133 kind: Ident span: 1:197-202 ident: !Ident @@ -230,15 +230,15 @@ nodes: - albums - title targets: - - 125 -- id: 133 + - 126 +- id: 134 kind: RqOperator span: 1:236-246 alias: up targets: - - 135 - parent: 160 -- id: 135 + - 136 + parent: 161 +- id: 136 kind: Ident span: 1:228-233 ident: !Ident @@ -246,15 +246,15 @@ nodes: - albums - title targets: - - 125 -- id: 136 + - 126 +- id: 137 kind: RqOperator span: 1:273-283 alias: ltrimmed targets: - - 138 - parent: 160 -- id: 138 + - 139 + parent: 161 +- id: 139 kind: Ident span: 1:265-270 ident: !Ident @@ -262,15 +262,15 @@ nodes: - albums - title targets: - - 125 -- id: 139 + - 126 +- id: 140 kind: RqOperator span: 1:310-320 alias: rtrimmed targets: - - 141 - parent: 160 -- id: 141 + - 142 + parent: 161 +- id: 142 kind: Ident span: 1:302-307 ident: !Ident @@ -278,15 +278,15 @@ nodes: - albums - title targets: - - 125 -- id: 142 + - 126 +- id: 143 kind: RqOperator span: 1:346-355 alias: trimmed targets: - - 144 - parent: 160 -- id: 144 + - 145 + parent: 161 +- id: 145 kind: Ident span: 1:338-343 ident: !Ident @@ -294,15 +294,15 @@ nodes: - albums - title targets: - - 125 -- id: 145 + - 126 +- id: 146 kind: RqOperator span: 1:377-388 alias: len targets: - - 147 - parent: 160 -- id: 147 + - 148 + parent: 161 +- id: 148 kind: Ident span: 1:369-374 ident: !Ident @@ -310,23 +310,23 @@ nodes: - albums - title targets: - - 125 -- id: 148 + - 126 +- id: 149 kind: RqOperator span: 1:411-427 alias: subs targets: - - 151 - 152 - 153 - parent: 160 -- id: 151 + - 154 + parent: 161 +- id: 152 kind: Literal span: 1:424-425 -- id: 152 +- id: 153 kind: Literal span: 1:426-427 -- id: 153 +- id: 154 kind: Ident span: 1:403-408 ident: !Ident @@ -334,23 +334,23 @@ nodes: - albums - title targets: - - 125 -- id: 154 + - 126 +- id: 155 kind: RqOperator span: 1:453-477 alias: replace targets: - - 157 - 158 - 159 - parent: 160 -- id: 157 + - 160 + parent: 161 +- id: 158 kind: Literal span: 1:466-470 -- id: 158 +- id: 159 kind: Literal span: 1:471-477 -- id: 159 +- id: 160 kind: Ident span: 1:445-450 ident: !Ident @@ -358,30 +358,30 @@ nodes: - albums - title targets: - - 125 -- id: 160 + - 126 +- id: 161 kind: Tuple span: 1:134-481 children: - - 127 - 128 - - 130 - - 133 - - 136 - - 139 - - 142 - - 145 - - 148 - - 154 - parent: 161 -- id: 161 + - 129 + - 131 + - 134 + - 137 + - 140 + - 143 + - 146 + - 149 + - 155 + parent: 162 +- id: 162 kind: 'TransformCall: Select' span: 1:127-481 children: - - 125 - - 160 - parent: 164 -- id: 162 + - 126 + - 161 + parent: 165 +- id: 163 kind: Ident span: 1:488-493 ident: !Ident @@ -389,38 +389,38 @@ nodes: - albums - title targets: - - 127 - parent: 164 -- id: 164 + - 128 + parent: 165 +- id: 165 kind: 'TransformCall: Sort' span: 1:482-494 children: - - 161 - 162 - parent: 184 -- id: 165 + - 163 + parent: 185 +- id: 166 kind: RqOperator span: 1:502-606 targets: - - 167 - - 179 - parent: 184 -- id: 167 + - 168 + - 180 + parent: 185 +- id: 168 kind: RqOperator span: 1:502-573 targets: - - 169 - - 174 -- id: 169 + - 170 + - 175 +- id: 170 kind: RqOperator span: 1:511-535 targets: - - 172 - 173 -- id: 172 + - 174 +- id: 173 kind: Literal span: 1:528-535 -- id: 173 +- id: 174 kind: Ident span: 1:503-508 ident: !Ident @@ -428,17 +428,17 @@ nodes: - albums - title targets: - - 127 -- id: 174 + - 128 +- id: 175 kind: RqOperator span: 1:549-572 targets: - - 177 - 178 -- id: 177 + - 179 +- id: 178 kind: Literal span: 1:563-572 -- id: 178 +- id: 179 kind: Ident span: 1:541-546 ident: !Ident @@ -446,17 +446,17 @@ nodes: - albums - title targets: - - 127 -- id: 179 + - 128 +- id: 180 kind: RqOperator span: 1:586-605 targets: - - 182 - 183 -- id: 182 + - 184 +- id: 183 kind: Literal span: 1:601-605 -- id: 183 +- id: 184 kind: Ident span: 1:578-583 ident: !Ident @@ -464,13 +464,13 @@ nodes: - albums - title targets: - - 127 -- id: 184 + - 128 +- id: 185 kind: 'TransformCall: Filter' span: 1:495-606 children: - - 164 - 165 + - 166 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 0727cfdc4f5c..b6a0d603e5ac 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: 128 + input_id: 129 except: - genre_id - !Single name: - num - target_id: 166 + target_id: 167 target_name: null - !Single name: - total - target_id: 174 + target_id: 175 target_name: null - !Single name: - last_val - target_id: 176 + target_id: 177 target_name: null inputs: - - id: 128 + - id: 129 name: tracks table: - default_db @@ -37,29 +37,29 @@ frames: name: - tracks - genre_id - target_id: 130 + target_id: 131 target_name: null - !All - input_id: 128 + input_id: 129 except: - genre_id - !Single name: - num - target_id: 166 + target_id: 167 target_name: null - !Single name: - total - target_id: 174 + target_id: 175 target_name: null - !Single name: - last_val - target_id: 176 + target_id: 177 target_name: null inputs: - - id: 128 + - id: 129 name: tracks table: - default_db @@ -70,29 +70,29 @@ frames: name: - tracks - genre_id - target_id: 130 + target_id: 131 target_name: null - !All - input_id: 128 + input_id: 129 except: - genre_id - !Single name: - num - target_id: 166 + target_id: 167 target_name: null - !Single name: - total - target_id: 174 + target_id: 175 target_name: null - !Single name: - last_val - target_id: 176 + target_id: 177 target_name: null inputs: - - id: 128 + - id: 129 name: tracks table: - default_db @@ -103,31 +103,31 @@ frames: name: - tracks - track_id - target_id: 190 + target_id: 191 target_name: null - !Single name: - tracks - genre_id - target_id: 191 + target_id: 192 target_name: null - !Single name: - num - target_id: 192 + target_id: 193 target_name: null - !Single name: - total - target_id: 193 + target_id: 194 target_name: null - !Single name: - last_val - target_id: 194 + target_id: 195 target_name: null inputs: - - id: 128 + - id: 129 name: tracks table: - default_db @@ -138,44 +138,44 @@ frames: name: - tracks - track_id - target_id: 190 + target_id: 191 target_name: null - !Single name: - tracks - genre_id - target_id: 191 + target_id: 192 target_name: null - !Single name: - num - target_id: 192 + target_id: 193 target_name: null - !Single name: - total - target_id: 193 + target_id: 194 target_name: null - !Single name: - last_val - target_id: 194 + target_id: 195 target_name: null inputs: - - id: 128 + - id: 129 name: tracks table: - default_db - tracks nodes: -- id: 128 +- id: 129 kind: Ident span: 1:470-481 ident: !Ident - default_db - tracks - parent: 180 -- id: 130 + parent: 181 +- id: 131 kind: Ident span: 1:488-496 ident: !Ident @@ -183,14 +183,14 @@ nodes: - tracks - genre_id targets: - - 128 - parent: 139 -- id: 139 + - 129 + parent: 140 +- id: 140 kind: Tuple span: 1:488-496 children: - - 130 -- id: 158 + - 131 +- id: 159 kind: Ident span: 1:506-518 ident: !Ident @@ -198,33 +198,33 @@ nodes: - tracks - milliseconds targets: - - 128 -- id: 166 + - 129 +- id: 167 kind: RqOperator span: 1:540-555 alias: num targets: - - 167 - parent: 179 -- id: 167 + - 168 + parent: 180 +- id: 168 kind: Literal -- id: 174 +- id: 175 kind: RqOperator span: 1:569-579 alias: total targets: - - 175 - parent: 179 -- id: 175 - kind: Literal + - 176 + parent: 180 - id: 176 + kind: Literal +- id: 177 kind: RqOperator span: 1:596-609 alias: last_val targets: - - 178 - parent: 179 -- id: 178 + - 179 + parent: 180 +- id: 179 kind: Ident span: 1:601-609 ident: !Ident @@ -232,33 +232,33 @@ nodes: - tracks - track_id targets: - - 128 -- id: 179 + - 129 +- id: 180 kind: Tuple span: 1:528-614 children: - - 166 - - 174 - - 176 - parent: 180 -- id: 180 + - 167 + - 175 + - 177 + parent: 181 +- id: 181 kind: 'TransformCall: Derive' span: 1:521-614 children: - - 128 - - 179 - parent: 182 -- id: 182 + - 129 + - 180 + parent: 183 +- id: 183 kind: 'TransformCall: Take' span: 1:617-624 children: - - 180 - - 183 - parent: 189 -- id: 183 + - 181 + - 184 + parent: 190 +- id: 184 kind: Literal - parent: 182 -- id: 186 + parent: 183 +- id: 187 kind: Ident span: 1:633-641 ident: !Ident @@ -266,9 +266,9 @@ nodes: - tracks - genre_id targets: - - 130 - parent: 189 -- id: 187 + - 131 + parent: 190 +- id: 188 kind: Ident span: 1:643-655 ident: !Ident @@ -276,17 +276,17 @@ nodes: - tracks - milliseconds targets: - - 128 - parent: 189 -- id: 189 + - 129 + parent: 190 +- id: 190 kind: 'TransformCall: Sort' span: 1:627-656 children: - - 182 - - 186 + - 183 - 187 - parent: 196 -- id: 190 + - 188 + parent: 197 +- id: 191 kind: Ident span: 1:665-673 ident: !Ident @@ -294,9 +294,9 @@ nodes: - tracks - track_id targets: - - 128 - parent: 195 -- id: 191 + - 129 + parent: 196 +- id: 192 kind: Ident span: 1:675-683 ident: !Ident @@ -304,60 +304,60 @@ nodes: - tracks - genre_id targets: - - 130 - parent: 195 -- id: 192 + - 131 + parent: 196 +- id: 193 kind: Ident span: 1:685-688 ident: !Ident - this - num targets: - - 166 - parent: 195 -- id: 193 + - 167 + parent: 196 +- id: 194 kind: Ident span: 1:690-695 ident: !Ident - this - total targets: - - 174 - parent: 195 -- id: 194 + - 175 + parent: 196 +- id: 195 kind: Ident span: 1:697-705 ident: !Ident - this - last_val targets: - - 176 - parent: 195 -- id: 195 + - 177 + parent: 196 +- id: 196 kind: Tuple span: 1:664-706 children: - - 190 - 191 - 192 - 193 - 194 - parent: 196 -- id: 196 + - 195 + parent: 197 +- id: 197 kind: 'TransformCall: Select' span: 1:657-706 children: - - 189 - - 195 - parent: 201 -- id: 197 + - 190 + - 196 + parent: 202 +- id: 198 kind: RqOperator span: 1:714-728 targets: - - 199 - 200 - parent: 201 -- id: 199 + - 201 + parent: 202 +- id: 200 kind: Ident span: 1:714-722 ident: !Ident @@ -365,16 +365,16 @@ nodes: - tracks - genre_id targets: - - 191 -- id: 200 + - 192 +- id: 201 kind: Literal span: 1:726-728 -- id: 201 +- id: 202 kind: 'TransformCall: Filter' span: 1:707-728 children: - - 196 - 197 + - 198 ast: name: Project stmts: diff --git a/prqlc/prqlc/tests/integration/sql.rs b/prqlc/prqlc/tests/integration/sql.rs index 006d87b3aca1..72d65563d093 100644 --- a/prqlc/prqlc/tests/integration/sql.rs +++ b/prqlc/prqlc/tests/integration/sql.rs @@ -370,6 +370,27 @@ fn date_trunc_unsupported_dialects() { .is_err()); } +#[test] +fn date_to_start_of_interval_unsupported_dialects() { + assert!(compile_with_sql_dialect( + "from events | select (event_time | date.to_start_of_interval 15 minute)", + sql::Dialect::SQLite + ) + .is_err()); + + assert!(compile_with_sql_dialect( + "from events | select (event_time | date.to_start_of_interval 15 minute)", + sql::Dialect::MySql + ) + .is_err()); + + assert!(compile_with_sql_dialect( + "from events | select (event_time | date.to_start_of_interval 15 minute)", + sql::Dialect::MsSql + ) + .is_err()); +} + #[test] fn date_to_text_bigquery_rfc3339() { assert_snapshot!(compile(r#" @@ -417,6 +438,35 @@ FROM ) } +#[rstest] +#[case::clickhouse( + sql::Dialect::ClickHouse, + "SELECT\n toStartOfInterval(event_time, INTERVAL 15 minute)\nFROM\n events\n" +)] +#[case::duckdb( + sql::Dialect::DuckDb, + "SELECT\n time_bucket(INTERVAL '15 minute', event_time)\nFROM\n events\n" +)] +#[case::postgres( + sql::Dialect::Postgres, + "SELECT\n date_bin(\n '15 minute',\n event_time,\n TIMESTAMP '1970-01-01 00:00:00'\n )\nFROM\n events\n" +)] +#[case::bigquery( + sql::Dialect::BigQuery, + "SELECT\n TIMESTAMP_BUCKET(\n CAST(event_time AS TIMESTAMP),\n INTERVAL 15 minute\n )\nFROM\n events\n" +)] +fn date_to_start_of_interval_operator( + #[case] dialect: sql::Dialect, + #[case] expected_sql: &'static str, +) { + let query = "from events | select (event_time | date.to_start_of_interval 15 minute)"; + + assert_eq!( + compile_with_sql_dialect(query, dialect).unwrap(), + expected_sql + ) +} + #[test] fn json_of_test() { let pl = prqlc::prql_to_pl("from employees | take 10").unwrap(); diff --git a/web/book/src/reference/stdlib/date.md b/web/book/src/reference/stdlib/date.md index a41c31634853..e5352bdce3a1 100644 --- a/web/book/src/reference/stdlib/date.md +++ b/web/book/src/reference/stdlib/date.md @@ -74,6 +74,36 @@ select (event_time | date.trunc "day") ``` +### `to_start_of_interval` + +Truncates a timestamp to the start of a fixed interval. + + +> [!NOTE] +> Since support and SQL syntax differs by database, PRQL +> **requires an explicit dialect** to be specified. + + +> [!NOTE] +> For now the supported DBs are: BigQuery, ClickHouse, DuckDB and Postgres. + +```prql +prql target:sql.postgres + +from events +select (event_time | date.to_start_of_interval 15 minute) + +``` + +The SQL output varies by dialect: + +| Dialect | SQL output | +| ---------- | --------------------------------------------------------------------- | +| BigQuery | `TIMESTAMP_BUCKET(CAST(event_time AS TIMESTAMP), INTERVAL 15 minute)` | +| ClickHouse | `toStartOfInterval(event_time, INTERVAL 15 minute)` | +| DuckDB | `time_bucket(INTERVAL '15 minute', event_time)` | +| Postgres | `date_bin('15 minute', event_time, TIMESTAMP '1970-01-01 00:00:00')` | + ### 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__date__date-functions__5.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__date__date-functions__5.snap new file mode 100644 index 000000000000..c78c7302f5ee --- /dev/null +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__date__date-functions__5.snap @@ -0,0 +1,13 @@ +--- +source: web/book/tests/documentation/book.rs +assertion_line: 75 +expression: "prql target:sql.postgres\n\nfrom events\nselect (event_time | date.to_start_of_interval 15 minute)\n\n" +--- +SELECT + date_bin( + '15 minute', + event_time, + TIMESTAMP '1970-01-01 00:00:00' + ) +FROM + events \ No newline at end of file