diff --git a/grammars/CotEditor/PRQL.yaml b/grammars/CotEditor/PRQL.yaml
index bf861676ff1f..48296a33e7c5 100644
--- a/grammars/CotEditor/PRQL.yaml
+++ b/grammars/CotEditor/PRQL.yaml
@@ -43,6 +43,7 @@ commands:
- beginString: stddev
- beginString: sum
- beginString: read_csv
+ - beginString: read_json
- beginString: read_parquet
- beginString: all
- beginString: map
diff --git a/grammars/GtkSourceView/prql.lang b/grammars/GtkSourceView/prql.lang
index b34f8cdd07e0..c6931b2f7e1d 100644
--- a/grammars/GtkSourceView/prql.lang
+++ b/grammars/GtkSourceView/prql.lang
@@ -112,6 +112,7 @@
read_csv
+ read_json
read_parquet
diff --git a/prqlc/bindings/prqlc-python/src/lib.rs b/prqlc/bindings/prqlc-python/src/lib.rs
index 9744d692117c..181805b18e6a 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":117,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":118,"target_name":null}}],"inputs":[{"id":115,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":115,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":120},{"id":117,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[115],"parent":119},{"id":118,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[115],"parent":119},{"id":119,"kind":"Tuple","span":"1:16-31","children":[117,118],"parent":120},{"id":120,"kind":"TransformCall: Select","span":"1:9-31","children":[115,119]}],"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":118,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":119,"target_name":null}}],"inputs":[{"id":116,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":116,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":121},{"id":118,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[116],"parent":120},{"id":119,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[116],"parent":120},{"id":120,"kind":"Tuple","span":"1:16-31","children":[118,119],"parent":121},{"id":121,"kind":"TransformCall: Select","span":"1:9-31","children":[116,120]}],"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":117,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":118,"target_name":null}}],"inputs":[{"id":115,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":115,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":120},{"id":117,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[115],"parent":119},{"id":118,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[115],"parent":119},{"id":119,"kind":"Tuple","span":"1:16-31","children":[117,118],"parent":120},{"id":120,"kind":"TransformCall: Select","span":"1:9-31","children":[115,119]}],"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":118,"target_name":null}},{"Single":{"name":["a","gamma"],"target_id":119,"target_name":null}}],"inputs":[{"id":116,"name":"a","table":["default_db","a"]}]}]],"nodes":[{"id":116,"kind":"Ident","span":"1:0-6","ident":{"Ident":["default_db","a"]},"parent":121},{"id":118,"kind":"Ident","span":"1:18-22","ident":{"Ident":["this","a","beta"]},"targets":[116],"parent":120},{"id":119,"kind":"Ident","span":"1:24-29","ident":{"Ident":["this","a","gamma"]},"targets":[116],"parent":120},{"id":120,"kind":"Tuple","span":"1:16-31","children":[118,119],"parent":121},{"id":121,"kind":"TransformCall: Select","span":"1:9-31","children":[116,120]}],"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 7a3130d04cff..d084b4f5ac31 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: 117
+ target_id: 118
target_name: null
- !Single
name:
- tracks
- album
- target_id: 118
+ target_id: 119
target_name: null
inputs:
- - id: 115
+ - id: 116
name: tracks
table:
- default_db
- tracks
nodes:
- - id: 115
+ - id: 116
kind: Ident
span: 1:0-11
ident: !Ident
- default_db
- tracks
- parent: 120
- - id: 117
+ parent: 121
+ - id: 118
kind: Ident
span: 1:22-28
ident: !Ident
@@ -464,9 +464,9 @@ fn debug() {
- tracks
- artist
targets:
- - 115
- parent: 119
- - id: 118
+ - 116
+ parent: 120
+ - id: 119
kind: Ident
span: 1:30-35
ident: !Ident
@@ -474,21 +474,21 @@ fn debug() {
- tracks
- album
targets:
- - 115
- parent: 119
- - id: 119
+ - 116
+ parent: 120
+ - id: 120
kind: Tuple
span: 1:21-36
children:
- - 117
- 118
- parent: 120
- - id: 120
+ - 119
+ parent: 121
+ - id: 121
kind: 'TransformCall: Select'
span: 1:14-36
children:
- - 115
- - 119
+ - 116
+ - 120
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 d867c92660d3..cefcc31e4bf5 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/src/semantic/resolver/mod.rs
-assertion_line: 234
expression: final_lineage
---
columns:
@@ -8,21 +7,21 @@ columns:
name:
- employees
- name
- target_id: 131
+ target_id: 132
target_name: ~
- Single:
name:
- employees
- salary
- target_id: 132
+ target_id: 133
target_name: ~
inputs:
- - id: 129
+ - id: 130
name: employees
table:
- default_db
- employees
- - id: 118
+ - id: 119
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 f81ac569c100..24b5e6c8c909 100644
--- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap
+++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-2.snap
@@ -4,18 +4,18 @@ expression: "resolve_lineage(r#\"\n from table_1\n join cu
---
columns:
- All:
- input_id: 116
+ input_id: 117
except: []
- All:
- input_id: 113
+ input_id: 114
except: []
inputs:
- - id: 116
+ - id: 117
name: table_1
table:
- default_db
- table_1
- - id: 113
+ - id: 114
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 dc1406d18d08..138b01718962 100644
--- a/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap
+++ b/prqlc/prqlc/src/semantic/resolver/snapshots/prqlc__semantic__resolver__test__frames_and_names-3.snap
@@ -7,26 +7,26 @@ columns:
name:
- e
- emp_no
- target_id: 126
+ target_id: 127
target_name: ~
- Single:
name:
- e
- gender
- target_id: 127
+ target_id: 128
target_name: ~
- Single:
name:
- emp_salary
- target_id: 145
+ target_id: 146
target_name: ~
inputs:
- - id: 119
+ - id: 120
name: e
table:
- default_db
- employees
- - id: 116
+ - id: 117
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 f90554639aa3..1ce7f654616f 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: 120
+ target_id: 121
target_name: ~
- Single:
name:
- orders
- gross
- target_id: 121
+ target_id: 122
target_name: ~
- Single:
name:
- orders
- tax
- target_id: 122
+ target_id: 123
target_name: ~
- Single:
name: ~
- target_id: 123
+ target_id: 124
target_name: ~
inputs:
- - id: 118
+ - id: 119
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 0a8091c88944..69ce91dd837d 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: 115
+ input_id: 116
except: []
inputs:
- - id: 115
+ - id: 116
name: c_invoice
table:
- default_db
@@ -94,14 +94,14 @@ lineage:
name:
- c_invoice
- issued_at
- target_id: 117
+ target_id: 118
target_name: ~
- Single:
name: ~
- target_id: 133
+ target_id: 134
target_name: ~
inputs:
- - id: 115
+ - id: 116
name: c_invoice
table:
- default_db
diff --git a/prqlc/prqlc/src/semantic/std.prql b/prqlc/prqlc/src/semantic/std.prql
index baf0d9fbb845..8171f7848d01 100644
--- a/prqlc/prqlc/src/semantic/std.prql
+++ b/prqlc/prqlc/src/semantic/std.prql
@@ -237,6 +237,7 @@ let read_parquet = func
union_by_name :false
-> internal std.read_parquet
let read_csv = source -> internal std.read_csv
+let read_json = source -> internal std.read_json
## PRQL compiler functions
diff --git a/prqlc/prqlc/src/sql/std.sql.prql b/prqlc/prqlc/src/sql/std.sql.prql
index 166411d1b724..dbf05aea47f9 100644
--- a/prqlc/prqlc/src/sql/std.sql.prql
+++ b/prqlc/prqlc/src/sql/std.sql.prql
@@ -123,6 +123,7 @@ module text {
# Source-reading functions, primarily for DuckDB
let read_parquet = binary_as_string file_row_number hive_partitioning union_by_name source -> s"read_parquet({source:0})"
let read_csv = source -> s"read_csv({source:0})"
+let read_json = source -> s"read_json({source:0})"
@{binding_strength=11}
let mul = l r -> null
@@ -218,7 +219,7 @@ module clickhouse {
let regex_search = text pattern -> s"match({text:0}, {pattern:0})"
let read_csv = source -> s"file({source:0}, 'CSV')"
-
+ let read_json = source -> s"file({source:0}, 'Json')"
let read_parquet = source -> s"file({source:0}, 'Parquet')"
}
@@ -244,7 +245,7 @@ module duckdb {
let regex_search = text pattern -> s"REGEXP_MATCHES({text:0}, {pattern:0})"
let read_csv = source -> s"read_csv_auto({source:0})"
-
+ let read_json = source -> s"read_json_auto({source:0})"
let read_parquet = binary_as_string file_row_number hive_partitioning union_by_name source -> s"read_parquet({source:0}, binary_as_string={binary_as_string:0}, file_row_number={file_row_number:0}, hive_partitioning={hive_partitioning:0}, union_by_name={union_by_name:0})"
}
diff --git a/prqlc/prqlc/tests/integration/data/chinook/media_types.json b/prqlc/prqlc/tests/integration/data/chinook/media_types.json
new file mode 100644
index 000000000000..4a452651ab85
--- /dev/null
+++ b/prqlc/prqlc/tests/integration/data/chinook/media_types.json
@@ -0,0 +1,7 @@
+[
+ { "media_type_id": 1, "name": "MPEG audio file" },
+ { "media_type_id": 2, "name": "Protected AAC audio file" },
+ { "media_type_id": 3, "name": "Protected MPEG-4 video file" },
+ { "media_type_id": 4, "name": "Purchased AAC audio file" },
+ { "media_type_id": 5, "name": "AAC audio file" }
+]
diff --git a/prqlc/prqlc/tests/integration/queries/read_csv.prql b/prqlc/prqlc/tests/integration/queries/read_csv.prql
index a805272b3948..3b59e6170ad4 100644
--- a/prqlc/prqlc/tests/integration/queries/read_csv.prql
+++ b/prqlc/prqlc/tests/integration/queries/read_csv.prql
@@ -2,4 +2,5 @@
# postgres:skip
# mysql:skip
from (read_csv "data_file_root/media_types.csv")
+append (read_json "data_file_root/media_types.json")
sort media_type_id
diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__read_csv.snap
index 014ce2394115..1ec98803053f 100644
--- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__read_csv.snap
+++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__read_csv.snap
@@ -1,6 +1,6 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nsort media_type_id\n"
+expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nappend (read_json \"data_file_root/media_types.json\")\nsort media_type_id\n"
input_file: prqlc/prqlc/tests/integration/queries/read_csv.prql
---
WITH table_0 AS (
@@ -8,10 +8,22 @@ WITH table_0 AS (
*
FROM
read_csv('data_file_root/media_types.csv')
+),
+table_2 AS (
+ SELECT
+ *
+ FROM
+ table_0
+ UNION
+ ALL
+ SELECT
+ *
+ FROM
+ read_json('data_file_root/media_types.json')
)
SELECT
*
FROM
- table_0
+ table_2
ORDER BY
media_type_id
diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__read_csv.snap
index 8fb05d5f393e..e577b889c860 100644
--- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__read_csv.snap
+++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compileall__read_csv.snap
@@ -1,56 +1,85 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nsort media_type_id\n"
+expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nappend (read_json \"data_file_root/media_types.json\")\nsort media_type_id\n"
input_file: prqlc/prqlc/tests/integration/queries/read_csv.prql
---
--- generic
+++ clickhouse
-@@ -1,12 +1,12 @@
+@@ -1,24 +1,24 @@
WITH table_0 AS (
SELECT
*
FROM
- read_csv('data_file_root/media_types.csv')
+ file('data_file_root/media_types.csv', 'CSV')
+ ),
+ table_2 AS (
+ SELECT
+ *
+ FROM
+ table_0
+ UNION
+ ALL
+ SELECT
+ *
+ FROM
+- read_json('data_file_root/media_types.json')
++ file('data_file_root/media_types.json', 'Json')
)
SELECT
*
FROM
- table_0
+ table_2
ORDER BY
media_type_id
--- generic
+++ duckdb
-@@ -1,12 +1,12 @@
+@@ -1,24 +1,24 @@
WITH table_0 AS (
SELECT
*
FROM
- read_csv('data_file_root/media_types.csv')
+ read_csv_auto('data_file_root/media_types.csv')
+ ),
+ table_2 AS (
+ SELECT
+ *
+ FROM
+ table_0
+ UNION
+ ALL
+ SELECT
+ *
+ FROM
+- read_json('data_file_root/media_types.json')
++ read_json_auto('data_file_root/media_types.json')
)
SELECT
*
FROM
- table_0
+ table_2
ORDER BY
media_type_id
--- generic
+++ glaredb
-@@ -1,12 +1,12 @@
+@@ -1,15 +1,15 @@
WITH table_0 AS (
SELECT
*
FROM
- read_csv('data_file_root/media_types.csv')
+ csv_scan('data_file_root/media_types.csv')
- )
- SELECT
- *
- FROM
- table_0
- ORDER BY
- media_type_id
+ ),
+ table_2 AS (
+ SELECT
+ *
+ FROM
+ table_0
+ UNION
+ ALL
+ SELECT
+ *
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 f0f75292a268..76a6a1655d0a 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: 121
+ input_id: 122
except: []
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -18,15 +18,15 @@ frames:
- - 1:124-154
- columns:
- !All
- input_id: 121
+ input_id: 122
except: []
- !Single
name:
- empty_name
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -35,42 +35,42 @@ frames:
- columns:
- !Single
name: null
- target_id: 134
+ target_id: 135
target_name: null
- !Single
name: null
- target_id: 137
+ target_id: 138
target_name: null
- !Single
name: null
- target_id: 140
+ target_id: 141
target_name: null
- !Single
name: null
- target_id: 143
+ target_id: 144
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:89-100
ident: !Ident
- default_db
- tracks
- parent: 127
-- id: 123
+ parent: 128
+- id: 124
kind: RqOperator
span: 1:108-123
targets:
- - 125
- 126
- parent: 127
-- id: 125
+ - 127
+ parent: 128
+- id: 126
kind: Ident
span: 1:108-116
ident: !Ident
@@ -78,26 +78,26 @@ nodes:
- tracks
- genre_id
targets:
- - 121
-- id: 126
+ - 122
+- id: 127
kind: Literal
span: 1:120-123
-- id: 127
+- id: 128
kind: 'TransformCall: Filter'
span: 1:101-123
children:
- - 121
- - 123
- parent: 133
-- id: 128
+ - 122
+ - 124
+ parent: 134
+- id: 129
kind: RqOperator
span: 1:144-154
alias: empty_name
targets:
- - 130
- 131
- parent: 132
-- id: 130
+ - 132
+ parent: 133
+- id: 131
kind: Ident
span: 1:144-148
ident: !Ident
@@ -105,30 +105,30 @@ nodes:
- tracks
- name
targets:
- - 121
-- id: 131
+ - 122
+- id: 132
kind: Literal
span: 1:152-154
-- id: 132
+- id: 133
kind: Tuple
span: 1:144-154
children:
- - 128
- parent: 133
-- id: 133
+ - 129
+ parent: 134
+- id: 134
kind: 'TransformCall: Derive'
span: 1:124-154
children:
- - 127
- - 132
- parent: 147
-- id: 134
+ - 128
+ - 133
+ parent: 148
+- id: 135
kind: RqOperator
span: 1:166-178
targets:
- - 136
- parent: 146
-- id: 136
+ - 137
+ parent: 147
+- id: 137
kind: Ident
span: 1:170-178
ident: !Ident
@@ -136,14 +136,14 @@ nodes:
- tracks
- track_id
targets:
- - 121
-- id: 137
+ - 122
+- id: 138
kind: RqOperator
span: 1:180-197
targets:
- - 139
- parent: 146
-- id: 139
+ - 140
+ parent: 147
+- id: 140
kind: Ident
span: 1:193-197
ident: !Ident
@@ -151,50 +151,50 @@ nodes:
- tracks
- name
targets:
- - 121
-- id: 140
+ - 122
+- id: 141
kind: RqOperator
span: 1:199-213
targets:
- - 142
- parent: 146
-- id: 142
+ - 143
+ parent: 147
+- id: 143
kind: Ident
span: 1:203-213
ident: !Ident
- this
- empty_name
targets:
- - 128
-- id: 143
+ - 129
+- id: 144
kind: RqOperator
span: 1:215-229
targets:
- - 145
- parent: 146
-- id: 145
+ - 146
+ parent: 147
+- id: 146
kind: Ident
span: 1:219-229
ident: !Ident
- this
- empty_name
targets:
- - 128
-- id: 146
+ - 129
+- id: 147
kind: Tuple
span: 1:165-230
children:
- - 134
- - 137
- - 140
- - 143
- parent: 147
-- id: 147
+ - 135
+ - 138
+ - 141
+ - 144
+ parent: 148
+- id: 148
kind: 'TransformCall: Aggregate'
span: 1:155-230
children:
- - 133
- - 146
+ - 134
+ - 147
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 7a42ddb8eabe..902e8eeb85a4 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-assertion_line: 149
expression: "from invoices\nselect { customer_id, invoice_id, billing_country }\ntake 10..15\nappend (\n from invoices\n select { customer_id, invoice_id, billing_country }\n take 40..45\n)\nselect { billing_country, invoice_id }\n"
input_file: prqlc/prqlc/tests/integration/queries/append_select.prql
---
@@ -11,22 +10,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 145
+ target_id: 146
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 146
+ target_id: 147
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 147
+ target_id: 148
target_name: null
inputs:
- - id: 143
+ - id: 144
name: invoices
table:
- default_db
@@ -37,22 +36,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 145
+ target_id: 146
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 146
+ target_id: 147
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 147
+ target_id: 148
target_name: null
inputs:
- - id: 143
+ - id: 144
name: invoices
table:
- default_db
@@ -63,22 +62,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
+ - id: 125
name: invoices
table:
- default_db
@@ -89,22 +88,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
+ - id: 125
name: invoices
table:
- default_db
@@ -115,27 +114,27 @@ frames:
name:
- invoices
- customer_id
- target_id: 145
+ target_id: 146
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 146
+ target_id: 147
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 147
+ target_id: 148
target_name: null
inputs:
- - id: 143
+ - id: 144
name: invoices
table:
- default_db
- invoices
- - id: 124
+ - id: 125
name: invoices
table:
- default_db
@@ -146,34 +145,34 @@ frames:
name:
- invoices
- billing_country
- target_id: 155
+ target_id: 156
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 156
+ target_id: 157
target_name: null
inputs:
- - id: 143
+ - id: 144
name: invoices
table:
- default_db
- invoices
- - id: 124
+ - id: 125
name: invoices
table:
- default_db
- invoices
nodes:
-- id: 124
+- id: 125
kind: Ident
span: 1:89-102
ident: !Ident
- default_db
- invoices
- parent: 130
-- id: 126
+ parent: 131
+- id: 127
kind: Ident
span: 1:114-125
ident: !Ident
@@ -181,9 +180,9 @@ nodes:
- invoices
- customer_id
targets:
- - 124
- parent: 129
-- id: 127
+ - 125
+ parent: 130
+- id: 128
kind: Ident
span: 1:127-137
ident: !Ident
@@ -191,9 +190,9 @@ nodes:
- invoices
- invoice_id
targets:
- - 124
- parent: 129
-- id: 128
+ - 125
+ parent: 130
+- id: 129
kind: Ident
span: 1:139-154
ident: !Ident
@@ -201,49 +200,49 @@ nodes:
- invoices
- billing_country
targets:
- - 124
- parent: 129
-- id: 129
+ - 125
+ parent: 130
+- id: 130
kind: Tuple
span: 1:112-156
children:
- - 126
- 127
- 128
- parent: 130
-- id: 130
+ - 129
+ parent: 131
+- id: 131
kind: 'TransformCall: Select'
span: 1:105-156
children:
- - 124
- - 129
- parent: 134
-- id: 131
+ - 125
+ - 130
+ parent: 135
+- id: 132
kind: Literal
span: 1:164-166
alias: start
- parent: 134
-- id: 132
+ parent: 135
+- id: 133
kind: Literal
span: 1:168-170
alias: end
- parent: 134
-- id: 134
+ parent: 135
+- id: 135
kind: 'TransformCall: Take'
span: 1:159-170
children:
- - 130
- 131
- 132
- parent: 154
-- id: 143
+ - 133
+ parent: 155
+- id: 144
kind: Ident
span: 1:0-13
ident: !Ident
- default_db
- invoices
- parent: 149
-- id: 145
+ parent: 150
+- id: 146
kind: Ident
span: 1:23-34
ident: !Ident
@@ -251,9 +250,9 @@ nodes:
- invoices
- customer_id
targets:
- - 143
- parent: 148
-- id: 146
+ - 144
+ parent: 149
+- id: 147
kind: Ident
span: 1:36-46
ident: !Ident
@@ -261,9 +260,9 @@ nodes:
- invoices
- invoice_id
targets:
- - 143
- parent: 148
-- id: 147
+ - 144
+ parent: 149
+- id: 148
kind: Ident
span: 1:48-63
ident: !Ident
@@ -271,49 +270,49 @@ nodes:
- invoices
- billing_country
targets:
- - 143
- parent: 148
-- id: 148
+ - 144
+ parent: 149
+- id: 149
kind: Tuple
span: 1:21-65
children:
- - 145
- 146
- 147
- parent: 149
-- id: 149
+ - 148
+ parent: 150
+- id: 150
kind: 'TransformCall: Select'
span: 1:14-65
children:
- - 143
- - 148
- parent: 153
-- id: 150
+ - 144
+ - 149
+ parent: 154
+- id: 151
kind: Literal
span: 1:71-73
alias: start
- parent: 153
-- id: 151
+ parent: 154
+- id: 152
kind: Literal
span: 1:75-77
alias: end
- parent: 153
-- id: 153
+ parent: 154
+- id: 154
kind: 'TransformCall: Take'
span: 1:66-77
children:
- - 149
- 150
- 151
- parent: 154
-- id: 154
+ - 152
+ parent: 155
+- id: 155
kind: 'TransformCall: Append'
span: 1:78-172
children:
- - 153
- - 134
- parent: 158
-- id: 155
+ - 154
+ - 135
+ parent: 159
+- id: 156
kind: Ident
span: 1:182-197
ident: !Ident
@@ -321,9 +320,9 @@ nodes:
- invoices
- billing_country
targets:
- - 147
- parent: 157
-- id: 156
+ - 148
+ parent: 158
+- id: 157
kind: Ident
span: 1:199-209
ident: !Ident
@@ -331,21 +330,21 @@ nodes:
- invoices
- invoice_id
targets:
- - 146
- parent: 157
-- id: 157
+ - 147
+ parent: 158
+- id: 158
kind: Tuple
span: 1:180-211
children:
- - 155
- 156
- parent: 158
-- id: 158
+ - 157
+ parent: 159
+- id: 159
kind: 'TransformCall: Select'
span: 1:173-211
children:
- - 154
- - 157
+ - 155
+ - 158
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 20c1b3269633..9d1e3ce65401 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-assertion_line: 149
expression: "from invoices\nderive total = case [total < 10 => total * 2, true => total]\nselect { customer_id, invoice_id, total }\ntake 5\nappend (\n from invoice_items\n derive unit_price = case [unit_price < 1 => unit_price * 2, true => unit_price]\n select { invoice_line_id, invoice_id, unit_price }\n take 5\n)\nselect { a = customer_id * 2, b = math.round 1 (invoice_id * total) }\n"
input_file: prqlc/prqlc/tests/integration/queries/append_select_compute.prql
---
@@ -8,15 +7,15 @@ frames:
- - 1:14-74
- columns:
- !All
- input_id: 161
+ input_id: 162
except: []
- !Single
name:
- total
- target_id: 163
+ target_id: 164
target_name: null
inputs:
- - id: 161
+ - id: 162
name: invoices
table:
- default_db
@@ -27,21 +26,21 @@ frames:
name:
- invoices
- customer_id
- target_id: 176
+ target_id: 177
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 177
+ target_id: 178
target_name: null
- !Single
name:
- total
- target_id: 178
+ target_id: 179
target_name: null
inputs:
- - id: 161
+ - id: 162
name: invoices
table:
- default_db
@@ -52,21 +51,21 @@ frames:
name:
- invoices
- customer_id
- target_id: 176
+ target_id: 177
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 177
+ target_id: 178
target_name: null
- !Single
name:
- total
- target_id: 178
+ target_id: 179
target_name: null
inputs:
- - id: 161
+ - id: 162
name: invoices
table:
- default_db
@@ -74,15 +73,15 @@ frames:
- - 1:156-235
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
- !Single
name:
- unit_price
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 127
+ - id: 128
name: invoice_items
table:
- default_db
@@ -93,21 +92,21 @@ frames:
name:
- invoice_items
- invoice_line_id
- target_id: 142
+ target_id: 143
target_name: null
- !Single
name:
- invoice_items
- invoice_id
- target_id: 143
+ target_id: 144
target_name: null
- !Single
name:
- unit_price
- target_id: 144
+ target_id: 145
target_name: null
inputs:
- - id: 127
+ - id: 128
name: invoice_items
table:
- default_db
@@ -118,21 +117,21 @@ frames:
name:
- invoice_items
- invoice_line_id
- target_id: 142
+ target_id: 143
target_name: null
- !Single
name:
- invoice_items
- invoice_id
- target_id: 143
+ target_id: 144
target_name: null
- !Single
name:
- unit_price
- target_id: 144
+ target_id: 145
target_name: null
inputs:
- - id: 127
+ - id: 128
name: invoice_items
table:
- default_db
@@ -143,26 +142,26 @@ frames:
name:
- invoices
- customer_id
- target_id: 176
+ target_id: 177
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 177
+ target_id: 178
target_name: null
- !Single
name:
- total
- target_id: 178
+ target_id: 179
target_name: null
inputs:
- - id: 161
+ - id: 162
name: invoices
table:
- default_db
- invoices
- - id: 127
+ - id: 128
name: invoice_items
table:
- default_db
@@ -172,49 +171,49 @@ frames:
- !Single
name:
- a
- target_id: 185
+ target_id: 186
target_name: null
- !Single
name:
- b
- target_id: 189
+ target_id: 190
target_name: null
inputs:
- - id: 161
+ - id: 162
name: invoices
table:
- default_db
- invoices
- - id: 127
+ - id: 128
name: invoice_items
table:
- default_db
- invoice_items
nodes:
-- id: 127
+- id: 128
kind: Ident
span: 1:135-153
ident: !Ident
- default_db
- invoice_items
- parent: 141
-- id: 129
+ parent: 142
+- id: 130
kind: Case
span: 1:176-235
alias: unit_price
targets:
- - 130
- - 134
- - 138
+ - 131
+ - 135
- 139
- parent: 140
-- id: 130
+ - 140
+ parent: 141
+- id: 131
kind: RqOperator
span: 1:182-196
targets:
- - 132
- 133
-- id: 132
+ - 134
+- id: 133
kind: Ident
span: 1:182-192
ident: !Ident
@@ -222,17 +221,17 @@ nodes:
- invoice_items
- unit_price
targets:
- - 127
-- id: 133
+ - 128
+- id: 134
kind: Literal
span: 1:195-196
-- id: 134
+- id: 135
kind: RqOperator
span: 1:200-214
targets:
- - 136
- 137
-- id: 136
+ - 138
+- id: 137
kind: Ident
span: 1:200-210
ident: !Ident
@@ -240,14 +239,14 @@ nodes:
- invoice_items
- unit_price
targets:
- - 127
-- id: 137
+ - 128
+- id: 138
kind: Literal
span: 1:213-214
-- id: 138
+- id: 139
kind: Literal
span: 1:216-220
-- id: 139
+- id: 140
kind: Ident
span: 1:224-234
ident: !Ident
@@ -255,21 +254,21 @@ nodes:
- invoice_items
- unit_price
targets:
- - 127
-- id: 140
+ - 128
+- id: 141
kind: Tuple
span: 1:176-235
children:
- - 129
- parent: 141
-- id: 141
+ - 130
+ parent: 142
+- id: 142
kind: 'TransformCall: Derive'
span: 1:156-235
children:
- - 127
- - 140
- parent: 146
-- id: 142
+ - 128
+ - 141
+ parent: 147
+- id: 143
kind: Ident
span: 1:247-262
ident: !Ident
@@ -277,9 +276,9 @@ nodes:
- invoice_items
- invoice_line_id
targets:
- - 127
- parent: 145
-- id: 143
+ - 128
+ parent: 146
+- id: 144
kind: Ident
span: 1:264-274
ident: !Ident
@@ -287,66 +286,66 @@ nodes:
- invoice_items
- invoice_id
targets:
- - 127
- parent: 145
-- id: 144
+ - 128
+ parent: 146
+- id: 145
kind: Ident
span: 1:276-286
ident: !Ident
- this
- unit_price
targets:
- - 129
- parent: 145
-- id: 145
+ - 130
+ parent: 146
+- id: 146
kind: Tuple
span: 1:245-288
children:
- - 142
- 143
- 144
- parent: 146
-- id: 146
+ - 145
+ parent: 147
+- id: 147
kind: 'TransformCall: Select'
span: 1:238-288
children:
- - 141
- - 145
- parent: 148
-- id: 148
+ - 142
+ - 146
+ parent: 149
+- id: 149
kind: 'TransformCall: Take'
span: 1:291-297
children:
- - 146
- - 149
- parent: 184
-- id: 149
+ - 147
+ - 150
+ parent: 185
+- id: 150
kind: Literal
- parent: 148
-- id: 161
+ parent: 149
+- id: 162
kind: Ident
span: 1:0-13
ident: !Ident
- default_db
- invoices
- parent: 175
-- id: 163
+ parent: 176
+- id: 164
kind: Case
span: 1:29-74
alias: total
targets:
- - 164
- - 168
- - 172
+ - 165
+ - 169
- 173
- parent: 174
-- id: 164
+ - 174
+ parent: 175
+- id: 165
kind: RqOperator
span: 1:35-45
targets:
- - 166
- 167
-- id: 166
+ - 168
+- id: 167
kind: Ident
span: 1:35-40
ident: !Ident
@@ -354,17 +353,17 @@ nodes:
- invoices
- total
targets:
- - 161
-- id: 167
+ - 162
+- id: 168
kind: Literal
span: 1:43-45
-- id: 168
+- id: 169
kind: RqOperator
span: 1:49-58
targets:
- - 170
- 171
-- id: 170
+ - 172
+- id: 171
kind: Ident
span: 1:49-54
ident: !Ident
@@ -372,14 +371,14 @@ nodes:
- invoices
- total
targets:
- - 161
-- id: 171
+ - 162
+- id: 172
kind: Literal
span: 1:57-58
-- id: 172
+- id: 173
kind: Literal
span: 1:60-64
-- id: 173
+- id: 174
kind: Ident
span: 1:68-73
ident: !Ident
@@ -387,21 +386,21 @@ nodes:
- invoices
- total
targets:
- - 161
-- id: 174
+ - 162
+- id: 175
kind: Tuple
span: 1:29-74
children:
- - 163
- parent: 175
-- id: 175
+ - 164
+ parent: 176
+- id: 176
kind: 'TransformCall: Derive'
span: 1:14-74
children:
- - 161
- - 174
- parent: 180
-- id: 176
+ - 162
+ - 175
+ parent: 181
+- id: 177
kind: Ident
span: 1:84-95
ident: !Ident
@@ -409,9 +408,9 @@ nodes:
- invoices
- customer_id
targets:
- - 161
- parent: 179
-- id: 177
+ - 162
+ parent: 180
+- id: 178
kind: Ident
span: 1:97-107
ident: !Ident
@@ -419,58 +418,58 @@ nodes:
- invoices
- invoice_id
targets:
- - 161
- parent: 179
-- id: 178
+ - 162
+ parent: 180
+- id: 179
kind: Ident
span: 1:109-114
ident: !Ident
- this
- total
targets:
- - 163
- parent: 179
-- id: 179
+ - 164
+ parent: 180
+- id: 180
kind: Tuple
span: 1:82-116
children:
- - 176
- 177
- 178
- parent: 180
-- id: 180
+ - 179
+ parent: 181
+- id: 181
kind: 'TransformCall: Select'
span: 1:75-116
children:
- - 175
- - 179
- parent: 182
-- id: 182
+ - 176
+ - 180
+ parent: 183
+- id: 183
kind: 'TransformCall: Take'
span: 1:117-123
children:
- - 180
- - 183
- parent: 184
-- id: 183
- kind: Literal
- parent: 182
+ - 181
+ - 184
+ parent: 185
- id: 184
+ kind: Literal
+ parent: 183
+- id: 185
kind: 'TransformCall: Append'
span: 1:124-299
children:
- - 182
- - 148
- parent: 197
-- id: 185
+ - 183
+ - 149
+ parent: 198
+- id: 186
kind: RqOperator
span: 1:313-328
alias: a
targets:
- - 187
- 188
- parent: 196
-- id: 187
+ - 189
+ parent: 197
+- id: 188
kind: Ident
span: 1:313-324
ident: !Ident
@@ -478,28 +477,28 @@ nodes:
- invoices
- customer_id
targets:
- - 176
-- id: 188
+ - 177
+- id: 189
kind: Literal
span: 1:327-328
-- id: 189
+- id: 190
kind: RqOperator
span: 1:334-367
alias: b
targets:
- - 191
- 192
- parent: 196
-- id: 191
+ - 193
+ parent: 197
+- id: 192
kind: Literal
span: 1:345-346
-- id: 192
+- id: 193
kind: RqOperator
span: 1:348-366
targets:
- - 194
- 195
-- id: 194
+ - 196
+- id: 195
kind: Ident
span: 1:348-358
ident: !Ident
@@ -507,28 +506,28 @@ nodes:
- invoices
- invoice_id
targets:
- - 177
-- id: 195
+ - 178
+- id: 196
kind: Ident
span: 1:361-366
ident: !Ident
- this
- total
targets:
- - 178
-- id: 196
+ - 179
+- id: 197
kind: Tuple
span: 1:307-369
children:
- - 185
- - 189
- parent: 197
-- id: 197
+ - 186
+ - 190
+ parent: 198
+- id: 198
kind: 'TransformCall: Select'
span: 1:300-369
children:
- - 184
- - 196
+ - 185
+ - 197
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 9eb9aedc0551..96578c01c21a 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-assertion_line: 149
expression: "from invoices\nselect { customer_id, invoice_id, billing_country }\ntake 5\nappend (\n from employees\n select { employee_id, employee_id, country }\n take 5\n)\nappend (\n from invoice_items\n select { invoice_line_id, invoice_id, null }\n take 5\n)\nselect { billing_country, invoice_id }\n"
input_file: prqlc/prqlc/tests/integration/queries/append_select_multiple_with_null.prql
---
@@ -11,22 +10,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 166
+ target_id: 167
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 167
+ target_id: 168
target_name: null
inputs:
- - id: 163
+ - id: 164
name: invoices
table:
- default_db
@@ -37,22 +36,22 @@ frames:
name:
- invoices
- customer_id
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 166
+ target_id: 167
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 167
+ target_id: 168
target_name: null
inputs:
- - id: 163
+ - id: 164
name: invoices
table:
- default_db
@@ -61,22 +60,22 @@ frames:
- columns:
- !Single
name: null
- target_id: 147
+ target_id: 148
target_name: null
- !Single
name:
- employees
- employee_id
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- employees
- country
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 145
+ - id: 146
name: employees
table:
- default_db
@@ -85,22 +84,22 @@ frames:
- columns:
- !Single
name: null
- target_id: 147
+ target_id: 148
target_name: null
- !Single
name:
- employees
- employee_id
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- employees
- country
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 145
+ - id: 146
name: employees
table:
- default_db
@@ -111,27 +110,27 @@ frames:
name:
- invoices
- customer_id
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 166
+ target_id: 167
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 167
+ target_id: 168
target_name: null
inputs:
- - id: 163
+ - id: 164
name: invoices
table:
- default_db
- invoices
- - id: 145
+ - id: 146
name: employees
table:
- default_db
@@ -142,20 +141,20 @@ frames:
name:
- invoice_items
- invoice_line_id
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- invoice_items
- invoice_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name: null
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
+ - id: 125
name: invoice_items
table:
- default_db
@@ -166,20 +165,20 @@ frames:
name:
- invoice_items
- invoice_line_id
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- invoice_items
- invoice_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name: null
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
+ - id: 125
name: invoice_items
table:
- default_db
@@ -190,32 +189,32 @@ frames:
name:
- invoices
- customer_id
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 166
+ target_id: 167
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 167
+ target_id: 168
target_name: null
inputs:
- - id: 163
+ - id: 164
name: invoices
table:
- default_db
- invoices
- - id: 145
+ - id: 146
name: employees
table:
- default_db
- employees
- - id: 124
+ - id: 125
name: invoice_items
table:
- default_db
@@ -226,39 +225,39 @@ frames:
name:
- invoices
- billing_country
- target_id: 175
+ target_id: 176
target_name: null
- !Single
name:
- invoices
- invoice_id
- target_id: 176
+ target_id: 177
target_name: null
inputs:
- - id: 163
+ - id: 164
name: invoices
table:
- default_db
- invoices
- - id: 145
+ - id: 146
name: employees
table:
- default_db
- employees
- - id: 124
+ - id: 125
name: invoice_items
table:
- default_db
- invoice_items
nodes:
-- id: 124
+- id: 125
kind: Ident
span: 1:168-186
ident: !Ident
- default_db
- invoice_items
- parent: 130
-- id: 126
+ parent: 131
+- id: 127
kind: Ident
span: 1:198-213
ident: !Ident
@@ -266,9 +265,9 @@ nodes:
- invoice_items
- invoice_line_id
targets:
- - 124
- parent: 129
-- id: 127
+ - 125
+ parent: 130
+- id: 128
kind: Ident
span: 1:215-225
ident: !Ident
@@ -276,45 +275,45 @@ nodes:
- invoice_items
- invoice_id
targets:
- - 124
- parent: 129
-- id: 128
+ - 125
+ parent: 130
+- id: 129
kind: Literal
span: 1:227-231
- parent: 129
-- id: 129
+ parent: 130
+- id: 130
kind: Tuple
span: 1:196-233
children:
- - 126
- 127
- 128
- parent: 130
-- id: 130
+ - 129
+ parent: 131
+- id: 131
kind: 'TransformCall: Select'
span: 1:189-233
children:
- - 124
- - 129
- parent: 132
-- id: 132
+ - 125
+ - 130
+ parent: 133
+- id: 133
kind: 'TransformCall: Take'
span: 1:236-242
children:
- - 130
- - 133
- parent: 174
-- id: 133
+ - 131
+ - 134
+ parent: 175
+- id: 134
kind: Literal
- parent: 132
-- id: 145
+ parent: 133
+- id: 146
kind: Ident
span: 1:84-98
ident: !Ident
- default_db
- employees
- parent: 151
-- id: 147
+ parent: 152
+- id: 148
kind: Ident
span: 1:110-121
ident: !Ident
@@ -322,9 +321,9 @@ nodes:
- employees
- employee_id
targets:
- - 145
- parent: 150
-- id: 148
+ - 146
+ parent: 151
+- id: 149
kind: Ident
span: 1:123-134
ident: !Ident
@@ -332,9 +331,9 @@ nodes:
- employees
- employee_id
targets:
- - 145
- parent: 150
-- id: 149
+ - 146
+ parent: 151
+- id: 150
kind: Ident
span: 1:136-143
ident: !Ident
@@ -342,41 +341,41 @@ nodes:
- employees
- country
targets:
- - 145
- parent: 150
-- id: 150
+ - 146
+ parent: 151
+- id: 151
kind: Tuple
span: 1:108-145
children:
- - 147
- 148
- 149
- parent: 151
-- id: 151
+ - 150
+ parent: 152
+- id: 152
kind: 'TransformCall: Select'
span: 1:101-145
children:
- - 145
- - 150
- parent: 153
-- id: 153
+ - 146
+ - 151
+ parent: 154
+- id: 154
kind: 'TransformCall: Take'
span: 1:148-154
children:
- - 151
- - 154
- parent: 173
-- id: 154
+ - 152
+ - 155
+ parent: 174
+- id: 155
kind: Literal
- parent: 153
-- id: 163
+ parent: 154
+- id: 164
kind: Ident
span: 1:0-13
ident: !Ident
- default_db
- invoices
- parent: 169
-- id: 165
+ parent: 170
+- id: 166
kind: Ident
span: 1:23-34
ident: !Ident
@@ -384,9 +383,9 @@ nodes:
- invoices
- customer_id
targets:
- - 163
- parent: 168
-- id: 166
+ - 164
+ parent: 169
+- id: 167
kind: Ident
span: 1:36-46
ident: !Ident
@@ -394,9 +393,9 @@ nodes:
- invoices
- invoice_id
targets:
- - 163
- parent: 168
-- id: 167
+ - 164
+ parent: 169
+- id: 168
kind: Ident
span: 1:48-63
ident: !Ident
@@ -404,48 +403,48 @@ nodes:
- invoices
- billing_country
targets:
- - 163
- parent: 168
-- id: 168
+ - 164
+ parent: 169
+- id: 169
kind: Tuple
span: 1:21-65
children:
- - 165
- 166
- 167
- parent: 169
-- id: 169
+ - 168
+ parent: 170
+- id: 170
kind: 'TransformCall: Select'
span: 1:14-65
children:
- - 163
- - 168
- parent: 171
-- id: 171
+ - 164
+ - 169
+ parent: 172
+- id: 172
kind: 'TransformCall: Take'
span: 1:66-72
children:
- - 169
- - 172
- parent: 173
-- id: 172
- kind: Literal
- parent: 171
+ - 170
+ - 173
+ parent: 174
- id: 173
+ kind: Literal
+ parent: 172
+- id: 174
kind: 'TransformCall: Append'
span: 1:73-156
children:
- - 171
- - 153
- parent: 174
-- id: 174
+ - 172
+ - 154
+ parent: 175
+- id: 175
kind: 'TransformCall: Append'
span: 1:157-244
children:
- - 173
- - 132
- parent: 178
-- id: 175
+ - 174
+ - 133
+ parent: 179
+- id: 176
kind: Ident
span: 1:254-269
ident: !Ident
@@ -453,9 +452,9 @@ nodes:
- invoices
- billing_country
targets:
- - 167
- parent: 177
-- id: 176
+ - 168
+ parent: 178
+- id: 177
kind: Ident
span: 1:271-281
ident: !Ident
@@ -463,21 +462,21 @@ nodes:
- invoices
- invoice_id
targets:
- - 166
- parent: 177
-- id: 177
+ - 167
+ parent: 178
+- id: 178
kind: Tuple
span: 1:252-283
children:
- - 175
- 176
- parent: 178
-- id: 178
+ - 177
+ parent: 179
+- id: 179
kind: 'TransformCall: Select'
span: 1:245-283
children:
- - 174
- - 177
+ - 175
+ - 178
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 e75322fdf43a..df802f8f9c02 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-assertion_line: 149
expression: "from invoices\nselect {an_id = invoice_id, name = null}\ntake 2\nappend (\n from employees\n select {an_id = null, name = first_name}\n take 2\n)\n"
input_file: prqlc/prqlc/tests/integration/queries/append_select_nulls.prql
---
@@ -10,15 +9,15 @@ frames:
- !Single
name:
- an_id
- target_id: 140
+ target_id: 141
target_name: null
- !Single
name:
- name
- target_id: 141
+ target_id: 142
target_name: null
inputs:
- - id: 138
+ - id: 139
name: invoices
table:
- default_db
@@ -28,15 +27,15 @@ frames:
- !Single
name:
- an_id
- target_id: 140
+ target_id: 141
target_name: null
- !Single
name:
- name
- target_id: 141
+ target_id: 142
target_name: null
inputs:
- - id: 138
+ - id: 139
name: invoices
table:
- default_db
@@ -46,15 +45,15 @@ frames:
- !Single
name:
- an_id
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- name
- target_id: 124
+ target_id: 125
target_name: null
inputs:
- - id: 121
+ - id: 122
name: employees
table:
- default_db
@@ -64,15 +63,15 @@ frames:
- !Single
name:
- an_id
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- name
- target_id: 124
+ target_id: 125
target_name: null
inputs:
- - id: 121
+ - id: 122
name: employees
table:
- default_db
@@ -82,38 +81,38 @@ frames:
- !Single
name:
- an_id
- target_id: 140
+ target_id: 141
target_name: null
- !Single
name:
- name
- target_id: 141
+ target_id: 142
target_name: null
inputs:
- - id: 138
+ - id: 139
name: invoices
table:
- default_db
- invoices
- - id: 121
+ - id: 122
name: employees
table:
- default_db
- employees
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:73-87
ident: !Ident
- default_db
- employees
- parent: 126
-- id: 123
+ parent: 127
+- id: 124
kind: Literal
span: 1:106-110
alias: an_id
- parent: 125
-- id: 124
+ parent: 126
+- id: 125
kind: Ident
span: 1:119-129
alias: name
@@ -122,40 +121,40 @@ nodes:
- employees
- first_name
targets:
- - 121
- parent: 125
-- id: 125
+ - 122
+ parent: 126
+- id: 126
kind: Tuple
span: 1:97-130
children:
- - 123
- 124
- parent: 126
-- id: 126
+ - 125
+ parent: 127
+- id: 127
kind: 'TransformCall: Select'
span: 1:90-130
children:
- - 121
- - 125
- parent: 128
-- id: 128
+ - 122
+ - 126
+ parent: 129
+- id: 129
kind: 'TransformCall: Take'
span: 1:133-139
children:
- - 126
- - 129
- parent: 147
-- id: 129
+ - 127
+ - 130
+ parent: 148
+- id: 130
kind: Literal
- parent: 128
-- id: 138
+ parent: 129
+- id: 139
kind: Ident
span: 1:0-13
ident: !Ident
- default_db
- invoices
- parent: 143
-- id: 140
+ parent: 144
+- id: 141
kind: Ident
span: 1:30-40
alias: an_id
@@ -164,43 +163,43 @@ nodes:
- invoices
- invoice_id
targets:
- - 138
- parent: 142
-- id: 141
+ - 139
+ parent: 143
+- id: 142
kind: Literal
span: 1:49-53
alias: name
- parent: 142
-- id: 142
+ parent: 143
+- id: 143
kind: Tuple
span: 1:21-54
children:
- - 140
- 141
- parent: 143
-- id: 143
+ - 142
+ parent: 144
+- id: 144
kind: 'TransformCall: Select'
span: 1:14-54
children:
- - 138
- - 142
- parent: 145
-- id: 145
+ - 139
+ - 143
+ parent: 146
+- id: 146
kind: 'TransformCall: Take'
span: 1:55-61
children:
- - 143
- - 146
- parent: 147
-- id: 146
- kind: Literal
- parent: 145
+ - 144
+ - 147
+ parent: 148
- id: 147
+ kind: Literal
+ parent: 146
+- id: 148
kind: 'TransformCall: Append'
span: 1:62-141
children:
- - 145
- - 128
+ - 146
+ - 129
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 e1dbe4bad8f6..58976495a8e4 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
@@ -1,6 +1,5 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-assertion_line: 149
expression: "from invoices\nselect { invoice_id, billing_country }\nappend (\n from invoices\n select { invoice_id = `invoice_id` + 100, billing_country }\n)\nfilter (billing_country | text.starts_with(\"I\"))\n"
input_file: prqlc/prqlc/tests/integration/queries/append_select_simple.prql
---
@@ -11,16 +10,16 @@ frames:
name:
- invoices
- invoice_id
- target_id: 137
+ target_id: 138
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 138
+ target_id: 139
target_name: null
inputs:
- - id: 135
+ - id: 136
name: invoices
table:
- default_db
@@ -30,16 +29,16 @@ frames:
- !Single
name:
- invoice_id
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 127
+ target_id: 128
target_name: null
inputs:
- - id: 121
+ - id: 122
name: invoices
table:
- default_db
@@ -50,21 +49,21 @@ frames:
name:
- invoices
- invoice_id
- target_id: 137
+ target_id: 138
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 138
+ target_id: 139
target_name: null
inputs:
- - id: 135
+ - id: 136
name: invoices
table:
- default_db
- invoices
- - id: 121
+ - id: 122
name: invoices
table:
- default_db
@@ -75,42 +74,42 @@ frames:
name:
- invoices
- invoice_id
- target_id: 137
+ target_id: 138
target_name: null
- !Single
name:
- invoices
- billing_country
- target_id: 138
+ target_id: 139
target_name: null
inputs:
- - id: 135
+ - id: 136
name: invoices
table:
- default_db
- invoices
- - id: 121
+ - id: 122
name: invoices
table:
- default_db
- invoices
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:64-77
ident: !Ident
- default_db
- invoices
- parent: 129
-- id: 123
+ parent: 130
+- id: 124
kind: RqOperator
span: 1:102-120
alias: invoice_id
targets:
- - 125
- 126
- parent: 128
-- id: 125
+ - 127
+ parent: 129
+- id: 126
kind: Ident
span: 1:102-114
ident: !Ident
@@ -118,11 +117,11 @@ nodes:
- invoices
- invoice_id
targets:
- - 121
-- id: 126
+ - 122
+- id: 127
kind: Literal
span: 1:117-120
-- id: 127
+- id: 128
kind: Ident
span: 1:122-137
ident: !Ident
@@ -130,30 +129,30 @@ nodes:
- invoices
- billing_country
targets:
- - 121
- parent: 128
-- id: 128
+ - 122
+ parent: 129
+- id: 129
kind: Tuple
span: 1:87-139
children:
- - 123
- - 127
- parent: 129
-- id: 129
+ - 124
+ - 128
+ parent: 130
+- id: 130
kind: 'TransformCall: Select'
span: 1:80-139
children:
- - 121
- - 128
- parent: 141
-- id: 135
+ - 122
+ - 129
+ parent: 142
+- id: 136
kind: Ident
span: 1:0-13
ident: !Ident
- default_db
- invoices
- parent: 140
-- id: 137
+ parent: 141
+- id: 138
kind: Ident
span: 1:23-33
ident: !Ident
@@ -161,9 +160,9 @@ nodes:
- invoices
- invoice_id
targets:
- - 135
- parent: 139
-- id: 138
+ - 136
+ parent: 140
+- id: 139
kind: Ident
span: 1:35-50
ident: !Ident
@@ -171,40 +170,40 @@ nodes:
- invoices
- billing_country
targets:
- - 135
- parent: 139
-- id: 139
+ - 136
+ parent: 140
+- id: 140
kind: Tuple
span: 1:21-52
children:
- - 137
- 138
- parent: 140
-- id: 140
- kind: 'TransformCall: Select'
- span: 1:14-52
- children:
- - 135
- 139
parent: 141
- id: 141
- kind: 'TransformCall: Append'
- span: 1:53-141
+ kind: 'TransformCall: Select'
+ span: 1:14-52
children:
+ - 136
- 140
- - 129
- parent: 147
+ parent: 142
- id: 142
+ kind: 'TransformCall: Append'
+ span: 1:53-141
+ children:
+ - 141
+ - 130
+ parent: 148
+- id: 143
kind: RqOperator
span: 1:168-189
targets:
- - 145
- 146
- parent: 147
-- id: 145
+ - 147
+ parent: 148
+- id: 146
kind: Literal
span: 1:185-188
-- id: 146
+- id: 147
kind: Ident
span: 1:150-165
ident: !Ident
@@ -212,13 +211,13 @@ nodes:
- invoices
- billing_country
targets:
- - 138
-- id: 147
+ - 139
+- id: 148
kind: 'TransformCall: Filter'
span: 1:142-190
children:
- - 141
- 142
+ - 143
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 f9e62684aa93..a9d413b0eac9 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_118
+ - _literal_119
- id
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name: null
- target_id: 161
+ target_id: 162
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:
- q_ii
- target_id: 177
+ target_id: 178
target_name: null
- !Single
name:
- q_if
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- q_fi
- target_id: 185
+ target_id: 186
target_name: null
- !Single
name:
- q_ff
- target_id: 189
+ target_id: 190
target_name: null
- !Single
name:
- r_ii
- target_id: 193
+ target_id: 194
target_name: null
- !Single
name:
- r_if
- target_id: 197
+ target_id: 198
target_name: null
- !Single
name:
- r_fi
- target_id: 201
+ target_id: 202
target_name: null
- !Single
name:
- r_ff
- target_id: 205
+ target_id: 206
target_name: null
- !Single
name: null
- target_id: 209
+ target_id: 210
target_name: null
- !Single
name: null
- target_id: 220
+ target_id: 221
target_name: null
- !Single
name: null
- target_id: 231
+ target_id: 232
target_name: null
- !Single
name: null
- target_id: 242
+ target_id: 243
target_name: null
inputs:
- - id: 118
- name: _literal_118
+ - id: 119
+ name: _literal_119
table:
- default_db
- - _literal_118
+ - _literal_119
- - 1:825-832
- columns:
- !Single
name:
- - _literal_118
+ - _literal_119
- id
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name: null
- target_id: 161
+ target_id: 162
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:
- q_ii
- target_id: 177
+ target_id: 178
target_name: null
- !Single
name:
- q_if
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- q_fi
- target_id: 185
+ target_id: 186
target_name: null
- !Single
name:
- q_ff
- target_id: 189
+ target_id: 190
target_name: null
- !Single
name:
- r_ii
- target_id: 193
+ target_id: 194
target_name: null
- !Single
name:
- r_if
- target_id: 197
+ target_id: 198
target_name: null
- !Single
name:
- r_fi
- target_id: 201
+ target_id: 202
target_name: null
- !Single
name:
- r_ff
- target_id: 205
+ target_id: 206
target_name: null
- !Single
name: null
- target_id: 209
+ target_id: 210
target_name: null
- !Single
name: null
- target_id: 220
+ target_id: 221
target_name: null
- !Single
name: null
- target_id: 231
+ target_id: 232
target_name: null
- !Single
name: null
- target_id: 242
+ target_id: 243
target_name: null
inputs:
- - id: 118
- name: _literal_118
+ - id: 119
+ name: _literal_119
table:
- default_db
- - _literal_118
+ - _literal_119
nodes:
-- id: 118
+- id: 119
kind: Array
span: 1:13-317
children:
- - 119
- - 125
- - 135
- - 145
- parent: 254
-- id: 119
+ - 120
+ - 126
+ - 136
+ - 146
+ parent: 255
+- id: 120
kind: Tuple
span: 1:24-92
children:
- - 120
- 121
- 122
- 123
- 124
- parent: 118
-- id: 120
+ - 125
+ parent: 119
+- id: 121
kind: Literal
span: 1:31-32
alias: id
- parent: 119
-- id: 121
+ parent: 120
+- id: 122
kind: Literal
span: 1:43-45
alias: x_int
- parent: 119
-- id: 122
+ parent: 120
+- id: 123
kind: Literal
span: 1:58-62
alias: x_float
- parent: 119
-- id: 123
+ parent: 120
+- id: 124
kind: Literal
span: 1:73-74
alias: k_int
- parent: 119
-- id: 124
+ parent: 120
+- id: 125
kind: Literal
span: 1:87-90
alias: k_float
- parent: 119
-- id: 125
+ parent: 120
+- id: 126
kind: Tuple
span: 1:98-166
children:
- - 126
- 127
- - 130
- - 133
+ - 128
+ - 131
- 134
- parent: 118
-- id: 126
+ - 135
+ parent: 119
+- id: 127
kind: Literal
span: 1:105-106
alias: id
- parent: 125
-- id: 127
+ parent: 126
+- id: 128
kind: Literal
span: 1:116-119
alias: x_int
- parent: 125
-- id: 130
+ parent: 126
+- id: 131
kind: Literal
span: 1:131-136
alias: x_float
- parent: 125
-- id: 133
+ parent: 126
+- id: 134
kind: Literal
span: 1:147-148
alias: k_int
- parent: 125
-- id: 134
+ parent: 126
+- id: 135
kind: Literal
span: 1:161-164
alias: k_float
- parent: 125
-- id: 135
+ parent: 126
+- id: 136
kind: Tuple
span: 1:172-240
children:
- - 136
- 137
- 138
- 139
- - 142
- parent: 118
-- id: 136
+ - 140
+ - 143
+ parent: 119
+- id: 137
kind: Literal
span: 1:179-180
alias: id
- parent: 135
-- id: 137
+ parent: 136
+- id: 138
kind: Literal
span: 1:191-193
alias: x_int
- parent: 135
-- id: 138
+ parent: 136
+- id: 139
kind: Literal
span: 1:206-210
alias: x_float
- parent: 135
-- id: 139
+ parent: 136
+- id: 140
kind: Literal
span: 1:220-222
alias: k_int
- parent: 135
-- id: 142
+ parent: 136
+- id: 143
kind: Literal
span: 1:234-238
alias: k_float
- parent: 135
-- id: 145
+ parent: 136
+- id: 146
kind: Tuple
span: 1:246-314
children:
- - 146
- 147
- - 150
- - 153
- - 156
- parent: 118
-- id: 146
+ - 148
+ - 151
+ - 154
+ - 157
+ parent: 119
+- id: 147
kind: Literal
span: 1:253-254
alias: id
- parent: 145
-- id: 147
+ parent: 146
+- id: 148
kind: Literal
span: 1:264-267
alias: x_int
- parent: 145
-- id: 150
+ parent: 146
+- id: 151
kind: Literal
span: 1:279-284
alias: x_float
- parent: 145
-- id: 153
+ parent: 146
+- id: 154
kind: Literal
span: 1:294-296
alias: k_int
- parent: 145
-- id: 156
+ parent: 146
+- id: 157
kind: Literal
span: 1:308-312
alias: k_float
- parent: 145
-- id: 160
+ parent: 146
+- id: 161
kind: Ident
span: 1:331-333
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- id
targets:
- - 118
- parent: 253
-- id: 161
+ - 119
+ parent: 254
+- id: 162
kind: RqOperator
span: 1:340-353
targets:
- - 163
- 164
- parent: 253
-- id: 163
+ - 165
+ parent: 254
+- id: 164
kind: Ident
span: 1:340-345
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 164
+ - 119
+- id: 165
kind: Ident
span: 1:348-353
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 165
+ - 119
+- id: 166
kind: RqOperator
span: 1:359-374
targets:
- - 167
- 168
- parent: 253
-- id: 167
+ - 169
+ parent: 254
+- id: 168
kind: Ident
span: 1:359-364
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 168
+ - 119
+- id: 169
kind: Ident
span: 1:367-374
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 169
+ - 119
+- id: 170
kind: RqOperator
span: 1:380-395
targets:
- - 171
- 172
- parent: 253
-- id: 171
+ - 173
+ parent: 254
+- id: 172
kind: Ident
span: 1:380-387
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 172
+ - 119
+- id: 173
kind: Ident
span: 1:390-395
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 173
+ - 119
+- id: 174
kind: RqOperator
span: 1:401-418
targets:
- - 175
- 176
- parent: 253
-- id: 175
+ - 177
+ parent: 254
+- id: 176
kind: Ident
span: 1:401-408
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 176
+ - 119
+- id: 177
kind: Ident
span: 1:411-418
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 177
+ - 119
+- id: 178
kind: RqOperator
span: 1:432-446
alias: q_ii
targets:
- - 179
- 180
- parent: 253
-- id: 179
+ - 181
+ parent: 254
+- id: 180
kind: Ident
span: 1:432-437
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 180
+ - 119
+- id: 181
kind: Ident
span: 1:441-446
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 181
+ - 119
+- id: 182
kind: RqOperator
span: 1:459-475
alias: q_if
targets:
- - 183
- 184
- parent: 253
-- id: 183
+ - 185
+ parent: 254
+- id: 184
kind: Ident
span: 1:459-464
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 184
+ - 119
+- id: 185
kind: Ident
span: 1:468-475
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 185
+ - 119
+- id: 186
kind: RqOperator
span: 1:488-504
alias: q_fi
targets:
- - 187
- 188
- parent: 253
-- id: 187
+ - 189
+ parent: 254
+- id: 188
kind: Ident
span: 1:488-495
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 188
+ - 119
+- id: 189
kind: Ident
span: 1:499-504
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 189
+ - 119
+- id: 190
kind: RqOperator
span: 1:517-535
alias: q_ff
targets:
- - 191
- 192
- parent: 253
-- id: 191
+ - 193
+ parent: 254
+- id: 192
kind: Ident
span: 1:517-524
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 192
+ - 119
+- id: 193
kind: Ident
span: 1:528-535
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 193
+ - 119
+- id: 194
kind: RqOperator
span: 1:549-562
alias: r_ii
targets:
- - 195
- 196
- parent: 253
-- id: 195
+ - 197
+ parent: 254
+- id: 196
kind: Ident
span: 1:549-554
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 196
+ - 119
+- id: 197
kind: Ident
span: 1:557-562
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 197
+ - 119
+- id: 198
kind: RqOperator
span: 1:575-590
alias: r_if
targets:
- - 199
- 200
- parent: 253
-- id: 199
+ - 201
+ parent: 254
+- id: 200
kind: Ident
span: 1:575-580
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_int
targets:
- - 118
-- id: 200
+ - 119
+- id: 201
kind: Ident
span: 1:583-590
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 201
+ - 119
+- id: 202
kind: RqOperator
span: 1:603-618
alias: r_fi
targets:
- - 203
- 204
- parent: 253
-- id: 203
+ - 205
+ parent: 254
+- id: 204
kind: Ident
span: 1:603-610
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 204
+ - 119
+- id: 205
kind: Ident
span: 1:613-618
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 205
+ - 119
+- id: 206
kind: RqOperator
span: 1:631-648
alias: r_ff
targets:
- - 207
- 208
- parent: 253
-- id: 207
+ - 209
+ parent: 254
+- id: 208
kind: Ident
span: 1:631-638
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- x_float
targets:
- - 118
-- id: 208
+ - 119
+- id: 209
kind: Ident
span: 1:641-648
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 209
+ - 119
+- id: 210
kind: RqOperator
span: 1:678-690
targets:
- - 212
- 213
- parent: 253
-- id: 212
+ - 214
+ parent: 254
+- id: 213
kind: Literal
span: 1:689-690
-- id: 213
+- id: 214
kind: RqOperator
span: 1:656-675
targets:
- - 215
- - 219
-- id: 215
+ - 216
+ - 220
+- id: 216
kind: RqOperator
span: 1:656-668
targets:
- - 217
- 218
-- id: 217
+ - 219
+- id: 218
kind: Ident
span: 1:656-660
ident: !Ident
- this
- q_ii
targets:
- - 177
-- id: 218
+ - 178
+- id: 219
kind: Ident
span: 1:663-668
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 219
+ - 119
+- id: 220
kind: Ident
span: 1:671-675
ident: !Ident
- this
- r_ii
targets:
- - 193
-- id: 220
+ - 194
+- id: 221
kind: RqOperator
span: 1:722-734
targets:
- - 223
- 224
- parent: 253
-- id: 223
+ - 225
+ parent: 254
+- id: 224
kind: Literal
span: 1:733-734
-- id: 224
+- id: 225
kind: RqOperator
span: 1:698-719
targets:
- - 226
- - 230
-- id: 226
+ - 227
+ - 231
+- id: 227
kind: RqOperator
span: 1:698-712
targets:
- - 228
- 229
-- id: 228
+ - 230
+- id: 229
kind: Ident
span: 1:698-702
ident: !Ident
- this
- q_if
targets:
- - 181
-- id: 229
+ - 182
+- id: 230
kind: Ident
span: 1:705-712
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 230
+ - 119
+- id: 231
kind: Ident
span: 1:715-719
ident: !Ident
- this
- r_if
targets:
- - 197
-- id: 231
+ - 198
+- id: 232
kind: RqOperator
span: 1:764-776
targets:
- - 234
- 235
- parent: 253
-- id: 234
+ - 236
+ parent: 254
+- id: 235
kind: Literal
span: 1:775-776
-- id: 235
+- id: 236
kind: RqOperator
span: 1:742-761
targets:
- - 237
- - 241
-- id: 237
+ - 238
+ - 242
+- id: 238
kind: RqOperator
span: 1:742-754
targets:
- - 239
- 240
-- id: 239
+ - 241
+- id: 240
kind: Ident
span: 1:742-746
ident: !Ident
- this
- q_fi
targets:
- - 185
-- id: 240
+ - 186
+- id: 241
kind: Ident
span: 1:749-754
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_int
targets:
- - 118
-- id: 241
+ - 119
+- id: 242
kind: Ident
span: 1:757-761
ident: !Ident
- this
- r_fi
targets:
- - 201
-- id: 242
+ - 202
+- id: 243
kind: RqOperator
span: 1:808-820
targets:
- - 245
- 246
- parent: 253
-- id: 245
+ - 247
+ parent: 254
+- id: 246
kind: Literal
span: 1:819-820
-- id: 246
+- id: 247
kind: RqOperator
span: 1:784-805
targets:
- - 248
- - 252
-- id: 248
+ - 249
+ - 253
+- id: 249
kind: RqOperator
span: 1:784-798
targets:
- - 250
- 251
-- id: 250
+ - 252
+- id: 251
kind: Ident
span: 1:784-788
ident: !Ident
- this
- q_ff
targets:
- - 189
-- id: 251
+ - 190
+- id: 252
kind: Ident
span: 1:791-798
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- k_float
targets:
- - 118
-- id: 252
+ - 119
+- id: 253
kind: Ident
span: 1:801-805
ident: !Ident
- this
- r_ff
targets:
- - 205
-- id: 253
+ - 206
+- id: 254
kind: Tuple
span: 1:325-824
children:
- - 160
- 161
- - 165
- - 169
- - 173
- - 177
- - 181
- - 185
- - 189
- - 193
- - 197
- - 201
- - 205
- - 209
- - 220
- - 231
- - 242
- parent: 254
-- id: 254
+ - 162
+ - 166
+ - 170
+ - 174
+ - 178
+ - 182
+ - 186
+ - 190
+ - 194
+ - 198
+ - 202
+ - 206
+ - 210
+ - 221
+ - 232
+ - 243
+ parent: 255
+- id: 255
kind: 'TransformCall: Select'
span: 1:318-824
children:
- - 118
- - 253
- parent: 257
-- id: 255
+ - 119
+ - 254
+ parent: 258
+- id: 256
kind: Ident
span: 1:830-832
ident: !Ident
- this
- - _literal_118
+ - _literal_119
- id
targets:
- - 160
- parent: 257
-- id: 257
+ - 161
+ parent: 258
+- id: 258
kind: 'TransformCall: Sort'
span: 1:825-832
children:
- - 254
- 255
+ - 256
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 ed8ab85f37bf..bad8c67308f5 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: 121
+ input_id: 122
except: []
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -21,15 +21,15 @@ frames:
name:
- tracks
- name
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- bin
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -40,28 +40,28 @@ frames:
name:
- tracks
- name
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- bin
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:13-24
ident: !Ident
- default_db
- tracks
- parent: 127
-- id: 125
+ parent: 128
+- id: 126
kind: Ident
span: 1:32-37
ident: !Ident
@@ -69,16 +69,16 @@ nodes:
- tracks
- bytes
targets:
- - 121
- parent: 127
-- id: 127
+ - 122
+ parent: 128
+- id: 128
kind: 'TransformCall: Sort'
span: 1:25-38
children:
- - 121
- - 125
- parent: 137
-- id: 128
+ - 122
+ - 126
+ parent: 138
+- id: 129
kind: Ident
span: 1:52-56
ident: !Ident
@@ -86,22 +86,22 @@ nodes:
- tracks
- name
targets:
- - 121
- parent: 136
-- id: 129
+ - 122
+ parent: 137
+- id: 130
kind: RqOperator
span: 1:68-95
alias: bin
targets:
- - 131
- - 135
- parent: 136
-- id: 131
+ - 132
+ - 136
+ parent: 137
+- id: 132
kind: RqOperator
span: 1:81-88
targets:
- - 134
-- id: 134
+ - 135
+- id: 135
kind: Ident
span: 1:70-78
ident: !Ident
@@ -109,33 +109,33 @@ nodes:
- tracks
- album_id
targets:
- - 121
-- id: 135
+ - 122
+- id: 136
kind: Literal
span: 1:92-94
-- id: 136
+- id: 137
kind: Tuple
span: 1:46-97
children:
- - 128
- 129
- parent: 137
-- id: 137
+ - 130
+ parent: 138
+- id: 138
kind: 'TransformCall: Select'
span: 1:39-97
children:
- - 127
- - 136
- parent: 139
-- id: 139
+ - 128
+ - 137
+ parent: 140
+- id: 140
kind: 'TransformCall: Take'
span: 1:98-105
children:
- - 137
- - 140
-- id: 140
+ - 138
+ - 141
+- id: 141
kind: Literal
- parent: 139
+ parent: 140
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 276bd04a0563..af0e3c50b111 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: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: genres
table:
- default_db
@@ -18,10 +18,10 @@ frames:
- - 1:20-31
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: genres
table:
- default_db
@@ -29,10 +29,10 @@ frames:
- - 1:32-39
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: genres
table:
- default_db
@@ -40,10 +40,10 @@ frames:
- - 1:40-51
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: genres
table:
- default_db
@@ -53,81 +53,81 @@ frames:
- !Single
name:
- d
- target_id: 139
+ target_id: 140
target_name: null
inputs:
- - id: 127
+ - id: 128
name: genres
table:
- default_db
- genres
nodes:
-- id: 127
+- id: 128
kind: Ident
span: 1:0-11
ident: !Ident
- default_db
- genres
- parent: 130
-- id: 130
+ parent: 131
+- id: 131
kind: 'TransformCall: Take'
span: 1:12-19
children:
- - 127
- - 131
- parent: 133
-- id: 131
- kind: Literal
- parent: 130
+ - 128
+ - 132
+ parent: 134
- id: 132
kind: Literal
- span: 1:27-31
- parent: 133
+ parent: 131
- id: 133
+ kind: Literal
+ span: 1:27-31
+ parent: 134
+- id: 134
kind: 'TransformCall: Filter'
span: 1:20-31
children:
- - 130
- - 132
- parent: 135
-- id: 135
+ - 131
+ - 133
+ parent: 136
+- id: 136
kind: 'TransformCall: Take'
span: 1:32-39
children:
- - 133
- - 136
- parent: 138
-- id: 136
- kind: Literal
- parent: 135
+ - 134
+ - 137
+ parent: 139
- id: 137
kind: Literal
- span: 1:47-51
- parent: 138
+ parent: 136
- id: 138
+ kind: Literal
+ span: 1:47-51
+ parent: 139
+- id: 139
kind: 'TransformCall: Filter'
span: 1:40-51
children:
- - 135
- - 137
- parent: 141
-- id: 139
+ - 136
+ - 138
+ parent: 142
+- id: 140
kind: Literal
span: 1:63-65
alias: d
- parent: 140
-- id: 140
+ parent: 141
+- id: 141
kind: Tuple
span: 1:63-65
children:
- - 139
- parent: 141
-- id: 141
+ - 140
+ parent: 142
+- id: 142
kind: 'TransformCall: Select'
span: 1:52-65
children:
- - 138
- - 140
+ - 139
+ - 141
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 3f6db9626545..fcc0d8c508c5 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: 118
+ input_id: 119
except: []
inputs:
- - id: 118
+ - id: 119
name: invoices
table:
- default_db
@@ -20,99 +20,99 @@ frames:
- !Single
name:
- d1
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- d2
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- d3
- target_id: 133
+ target_id: 134
target_name: null
- !Single
name:
- d4
- target_id: 138
+ target_id: 139
target_name: null
- !Single
name:
- d5
- target_id: 143
+ target_id: 144
target_name: null
- !Single
name:
- d6
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- d7
- target_id: 153
+ target_id: 154
target_name: null
- !Single
name:
- d8
- target_id: 158
+ target_id: 159
target_name: null
- !Single
name:
- d9
- target_id: 163
+ target_id: 164
target_name: null
- !Single
name:
- d10
- target_id: 168
+ target_id: 169
target_name: null
- !Single
name:
- d11
- target_id: 173
+ target_id: 174
target_name: null
- !Single
name:
- d12
- target_id: 178
+ target_id: 179
target_name: null
inputs:
- - id: 118
+ - id: 119
name: invoices
table:
- default_db
- invoices
nodes:
-- id: 118
+- id: 119
kind: Ident
span: 1:57-70
ident: !Ident
- default_db
- invoices
- parent: 121
-- id: 121
+ parent: 122
+- id: 122
kind: 'TransformCall: Take'
span: 1:71-78
children:
- - 118
- - 122
- parent: 184
-- id: 122
- kind: Literal
- parent: 121
+ - 119
+ - 123
+ parent: 185
- id: 123
+ kind: Literal
+ parent: 122
+- id: 124
kind: RqOperator
span: 1:113-136
alias: d1
targets:
- - 126
- 127
- parent: 183
-- id: 126
+ - 128
+ parent: 184
+- id: 127
kind: Literal
span: 1:126-136
-- id: 127
+- id: 128
kind: Ident
span: 1:98-110
ident: !Ident
@@ -120,19 +120,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 128
+ - 119
+- id: 129
kind: RqOperator
span: 1:164-181
alias: d2
targets:
- - 131
- 132
- parent: 183
-- id: 131
+ - 133
+ parent: 184
+- id: 132
kind: Literal
span: 1:177-181
-- id: 132
+- id: 133
kind: Ident
span: 1:149-161
ident: !Ident
@@ -140,19 +140,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 133
+ - 119
+- id: 134
kind: RqOperator
span: 1:209-226
alias: d3
targets:
- - 136
- 137
- parent: 183
-- id: 136
+ - 138
+ parent: 184
+- id: 137
kind: Literal
span: 1:222-226
-- id: 137
+- id: 138
kind: Ident
span: 1:194-206
ident: !Ident
@@ -160,19 +160,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 138
+ - 119
+- id: 139
kind: RqOperator
span: 1:254-280
alias: d4
targets:
- - 141
- 142
- parent: 183
-- id: 141
+ - 143
+ parent: 184
+- id: 142
kind: Literal
span: 1:267-280
-- id: 142
+- id: 143
kind: Ident
span: 1:239-251
ident: !Ident
@@ -180,19 +180,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 143
+ - 119
+- id: 144
kind: RqOperator
span: 1:308-325
alias: d5
targets:
- - 146
- 147
- parent: 183
-- id: 146
+ - 148
+ parent: 184
+- id: 147
kind: Literal
span: 1:321-325
-- id: 147
+- id: 148
kind: Ident
span: 1:293-305
ident: !Ident
@@ -200,19 +200,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 148
+ - 119
+- id: 149
kind: RqOperator
span: 1:353-380
alias: d6
targets:
- - 151
- 152
- parent: 183
-- id: 151
+ - 153
+ parent: 184
+- id: 152
kind: Literal
span: 1:366-380
-- id: 152
+- id: 153
kind: Ident
span: 1:338-350
ident: !Ident
@@ -220,19 +220,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 153
+ - 119
+- id: 154
kind: RqOperator
span: 1:408-451
alias: d7
targets:
- - 156
- 157
- parent: 183
-- id: 156
+ - 158
+ parent: 184
+- id: 157
kind: Literal
span: 1:421-451
-- id: 157
+- id: 158
kind: Ident
span: 1:393-405
ident: !Ident
@@ -240,19 +240,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 158
+ - 119
+- id: 159
kind: RqOperator
span: 1:479-496
alias: d8
targets:
- - 161
- 162
- parent: 183
-- id: 161
+ - 163
+ parent: 184
+- id: 162
kind: Literal
span: 1:492-496
-- id: 162
+- id: 163
kind: Ident
span: 1:464-476
ident: !Ident
@@ -260,19 +260,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 163
+ - 119
+- id: 164
kind: RqOperator
span: 1:524-549
alias: d9
targets:
- - 166
- 167
- parent: 183
-- id: 166
+ - 168
+ parent: 184
+- id: 167
kind: Literal
span: 1:537-549
-- id: 167
+- id: 168
kind: Ident
span: 1:509-521
ident: !Ident
@@ -280,19 +280,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 168
+ - 119
+- id: 169
kind: RqOperator
span: 1:578-603
alias: d10
targets:
- - 171
- 172
- parent: 183
-- id: 171
+ - 173
+ parent: 184
+- id: 172
kind: Literal
span: 1:591-603
-- id: 172
+- id: 173
kind: Ident
span: 1:563-575
ident: !Ident
@@ -300,19 +300,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 173
+ - 119
+- id: 174
kind: RqOperator
span: 1:632-654
alias: d11
targets:
- - 176
- 177
- parent: 183
-- id: 176
+ - 178
+ parent: 184
+- id: 177
kind: Literal
span: 1:645-654
-- id: 177
+- id: 178
kind: Ident
span: 1:617-629
ident: !Ident
@@ -320,19 +320,19 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 178
+ - 119
+- id: 179
kind: RqOperator
span: 1:683-714
alias: d12
targets:
- - 181
- 182
- parent: 183
-- id: 181
+ - 183
+ parent: 184
+- id: 182
kind: Literal
span: 1:696-714
-- id: 182
+- id: 183
kind: Ident
span: 1:668-680
ident: !Ident
@@ -340,30 +340,30 @@ nodes:
- invoices
- invoice_date
targets:
- - 118
-- id: 183
+ - 119
+- id: 184
kind: Tuple
span: 1:86-718
children:
- - 123
- - 128
- - 133
- - 138
- - 143
- - 148
- - 153
- - 158
- - 163
- - 168
- - 173
- - 178
- parent: 184
-- id: 184
+ - 124
+ - 129
+ - 134
+ - 139
+ - 144
+ - 149
+ - 154
+ - 159
+ - 164
+ - 169
+ - 174
+ - 179
+ parent: 185
+- id: 185
kind: 'TransformCall: Select'
span: 1:79-718
children:
- - 121
- - 183
+ - 122
+ - 184
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 778a2c2b98e2..4d3195ac19a3 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: 123
+ target_id: 124
target_name: null
- !Single
name:
- tracks
- genre_id
- target_id: 124
+ target_id: 125
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -30,16 +30,16 @@ frames:
name:
- tracks
- album_id
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- tracks
- genre_id
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -50,29 +50,29 @@ frames:
name:
- tracks
- album_id
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- tracks
- genre_id
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:13-24
ident: !Ident
- default_db
- tracks
- parent: 126
-- id: 123
+ parent: 127
+- id: 124
kind: Ident
span: 1:33-41
ident: !Ident
@@ -80,9 +80,9 @@ nodes:
- tracks
- album_id
targets:
- - 121
- parent: 125
-- id: 124
+ - 122
+ parent: 126
+- id: 125
kind: Ident
span: 1:43-51
ident: !Ident
@@ -90,81 +90,81 @@ nodes:
- tracks
- genre_id
targets:
- - 121
- parent: 125
-- id: 125
+ - 122
+ parent: 126
+- id: 126
kind: Tuple
span: 1:32-52
children:
- - 123
- 124
- parent: 126
-- id: 126
+ - 125
+ parent: 127
+- id: 127
kind: 'TransformCall: Select'
span: 1:25-52
children:
- - 121
- - 125
- parent: 147
-- id: 128
+ - 122
+ - 126
+ parent: 148
+- id: 129
kind: Ident
ident: !Ident
- this
- tracks
- album_id
targets:
- - 123
- parent: 130
-- id: 129
+ - 124
+ parent: 131
+- id: 130
kind: Ident
ident: !Ident
- this
- tracks
- genre_id
targets:
- - 124
- parent: 130
-- id: 130
+ - 125
+ parent: 131
+- id: 131
kind: Tuple
span: 1:59-67
children:
- - 128
- 129
-- id: 147
+ - 130
+- id: 148
kind: 'TransformCall: Take'
span: 1:69-75
children:
- - 126
- - 148
- parent: 155
-- id: 148
+ - 127
+ - 149
+ parent: 156
+- id: 149
kind: Literal
- parent: 147
-- id: 152
+ parent: 148
+- id: 153
kind: Ident
ident: !Ident
- this
- tracks
- album_id
targets:
- - 128
- parent: 155
-- id: 153
+ - 129
+ parent: 156
+- id: 154
kind: Ident
ident: !Ident
- this
- tracks
- genre_id
targets:
- - 129
- parent: 155
-- id: 155
+ - 130
+ parent: 156
+- id: 156
kind: 'TransformCall: Sort'
span: 1:77-90
children:
- - 147
- - 152
+ - 148
- 153
+ - 154
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 6b286f483e47..9d65a3a794d0 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: 123
+ target_id: 124
target_name: null
- !Single
name:
- tracks
- media_type_id
- target_id: 124
+ target_id: 125
target_name: null
- !Single
name:
- tracks
- album_id
- target_id: 125
+ target_id: 126
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -36,22 +36,22 @@ frames:
name:
- tracks
- genre_id
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- tracks
- media_type_id
- target_id: 129
+ target_id: 130
target_name: null
- !Single
name:
- tracks
- album_id
- target_id: 125
+ target_id: 126
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -62,35 +62,35 @@ frames:
name:
- tracks
- genre_id
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- tracks
- media_type_id
- target_id: 129
+ target_id: 130
target_name: null
- !Single
name:
- tracks
- album_id
- target_id: 125
+ target_id: 126
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:13-24
ident: !Ident
- default_db
- tracks
- parent: 127
-- id: 123
+ parent: 128
+- id: 124
kind: Ident
span: 1:33-41
ident: !Ident
@@ -98,9 +98,9 @@ nodes:
- tracks
- genre_id
targets:
- - 121
- parent: 126
-- id: 124
+ - 122
+ parent: 127
+- id: 125
kind: Ident
span: 1:43-56
ident: !Ident
@@ -108,9 +108,9 @@ nodes:
- tracks
- media_type_id
targets:
- - 121
- parent: 126
-- id: 125
+ - 122
+ parent: 127
+- id: 126
kind: Ident
span: 1:58-66
ident: !Ident
@@ -118,24 +118,24 @@ nodes:
- tracks
- album_id
targets:
- - 121
- parent: 126
-- id: 126
+ - 122
+ parent: 127
+- id: 127
kind: Tuple
span: 1:32-67
children:
- - 123
- 124
- 125
- parent: 127
-- id: 127
+ - 126
+ parent: 128
+- id: 128
kind: 'TransformCall: Select'
span: 1:25-67
children:
- - 121
- - 126
- parent: 159
-- id: 128
+ - 122
+ - 127
+ parent: 160
+- id: 129
kind: Ident
span: 1:75-83
ident: !Ident
@@ -143,9 +143,9 @@ nodes:
- tracks
- genre_id
targets:
- - 123
- parent: 130
-- id: 129
+ - 124
+ parent: 131
+- id: 130
kind: Ident
span: 1:85-98
ident: !Ident
@@ -153,15 +153,15 @@ nodes:
- tracks
- media_type_id
targets:
- - 124
- parent: 130
-- id: 130
+ - 125
+ parent: 131
+- id: 131
kind: Tuple
span: 1:74-99
children:
- - 128
- 129
-- id: 155
+ - 130
+- id: 156
kind: Ident
span: 1:108-116
ident: !Ident
@@ -169,18 +169,18 @@ nodes:
- tracks
- album_id
targets:
- - 125
-- id: 159
+ - 126
+- id: 160
kind: 'TransformCall: Take'
span: 1:120-126
children:
- - 127
- - 160
- parent: 168
-- id: 160
+ - 128
+ - 161
+ parent: 169
+- id: 161
kind: Literal
- parent: 159
-- id: 165
+ parent: 160
+- id: 166
kind: Ident
span: 1:135-143
ident: !Ident
@@ -188,9 +188,9 @@ nodes:
- tracks
- genre_id
targets:
- - 128
- parent: 168
-- id: 166
+ - 129
+ parent: 169
+- id: 167
kind: Ident
span: 1:145-158
ident: !Ident
@@ -198,15 +198,15 @@ nodes:
- tracks
- media_type_id
targets:
- - 129
- parent: 168
-- id: 168
+ - 130
+ parent: 169
+- id: 169
kind: 'TransformCall: Sort'
span: 1:128-159
children:
- - 159
- - 165
+ - 160
- 166
+ - 167
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 b7f88e09376a..3bdb5a107ff3 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: 133
+ target_id: 134
target_name: a
inputs:
- - id: 133
+ - id: 134
name: genre_count
table:
- default_db
@@ -23,29 +23,29 @@ frames:
- !Single
name:
- a
- target_id: 140
+ target_id: 141
target_name: null
inputs:
- - id: 133
+ - id: 134
name: genre_count
table:
- default_db
- genres
nodes:
-- id: 133
+- id: 134
kind: Ident
span: 1:187-203
ident: !Ident
- genre_count
- parent: 139
-- id: 135
+ parent: 140
+- id: 136
kind: RqOperator
span: 1:211-216
targets:
- - 137
- 138
- parent: 139
-- id: 137
+ - 139
+ parent: 140
+- id: 138
kind: Ident
span: 1:211-212
ident: !Ident
@@ -53,25 +53,25 @@ nodes:
- genre_count
- a
targets:
- - 133
-- id: 138
+ - 134
+- id: 139
kind: Literal
span: 1:215-216
-- id: 139
+- id: 140
kind: 'TransformCall: Filter'
span: 1:204-216
children:
- - 133
- - 135
- parent: 144
-- id: 140
+ - 134
+ - 136
+ parent: 145
+- id: 141
kind: RqOperator
span: 1:228-230
alias: a
targets:
- - 142
- parent: 143
-- id: 142
+ - 143
+ parent: 144
+- id: 143
kind: Ident
span: 1:229-230
ident: !Ident
@@ -79,19 +79,19 @@ nodes:
- genre_count
- a
targets:
- - 133
-- id: 143
+ - 134
+- id: 144
kind: Tuple
span: 1:228-230
children:
- - 140
- parent: 144
-- id: 144
+ - 141
+ parent: 145
+- id: 145
kind: 'TransformCall: Select'
span: 1:217-230
children:
- - 139
- - 143
+ - 140
+ - 144
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 04d77c930afb..0627f251174f 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: 125
+ input_id: 126
except: []
inputs:
- - id: 125
+ - id: 126
name: a
table:
- default_db
@@ -18,18 +18,18 @@ frames:
- - 1:35-59
- columns:
- !All
- input_id: 125
+ input_id: 126
except: []
- !All
- input_id: 119
+ input_id: 120
except: []
inputs:
- - id: 125
+ - id: 126
name: a
table:
- default_db
- albums
- - id: 119
+ - id: 120
name: tracks
table:
- default_db
@@ -40,26 +40,26 @@ frames:
name:
- a
- album_id
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- a
- title
- target_id: 136
+ target_id: 137
target_name: null
- !Single
name:
- price
- target_id: 154
+ target_id: 155
target_name: null
inputs:
- - id: 125
+ - id: 126
name: a
table:
- default_db
- albums
- - id: 119
+ - id: 120
name: tracks
table:
- default_db
@@ -70,63 +70,63 @@ frames:
name:
- a
- album_id
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- a
- title
- target_id: 136
+ target_id: 137
target_name: null
- !Single
name:
- price
- target_id: 154
+ target_id: 155
target_name: null
inputs:
- - id: 125
+ - id: 126
name: a
table:
- default_db
- albums
- - id: 119
+ - id: 120
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 119
+- id: 120
kind: Ident
span: 1:40-46
ident: !Ident
- default_db
- tracks
- parent: 134
-- id: 125
+ parent: 135
+- id: 126
kind: Ident
span: 1:13-26
ident: !Ident
- default_db
- albums
- parent: 128
-- id: 128
+ parent: 129
+- id: 129
kind: 'TransformCall: Take'
span: 1:27-34
children:
- - 125
- - 129
- parent: 134
-- id: 129
- kind: Literal
- parent: 128
+ - 126
+ - 130
+ parent: 135
- id: 130
+ kind: Literal
+ parent: 129
+- id: 131
kind: RqOperator
span: 1:48-58
targets:
- - 132
- 133
- parent: 134
-- id: 132
+ - 134
+ parent: 135
+- id: 133
kind: Ident
span: 1:50-58
ident: !Ident
@@ -134,8 +134,8 @@ nodes:
- a
- album_id
targets:
- - 125
-- id: 133
+ - 126
+- id: 134
kind: Ident
span: 1:50-58
ident: !Ident
@@ -143,16 +143,16 @@ nodes:
- tracks
- album_id
targets:
- - 119
-- id: 134
+ - 120
+- id: 135
kind: 'TransformCall: Join'
span: 1:35-59
children:
- - 128
- - 119
- - 130
- parent: 162
-- id: 135
+ - 129
+ - 120
+ - 131
+ parent: 163
+- id: 136
kind: Ident
span: 1:67-77
ident: !Ident
@@ -160,9 +160,9 @@ nodes:
- a
- album_id
targets:
- - 125
- parent: 137
-- id: 136
+ - 126
+ parent: 138
+- id: 137
kind: Ident
span: 1:79-86
ident: !Ident
@@ -170,32 +170,32 @@ nodes:
- a
- title
targets:
- - 125
- parent: 137
-- id: 137
+ - 126
+ parent: 138
+- id: 138
kind: Tuple
span: 1:66-87
children:
- - 135
- 136
- parent: 162
-- id: 154
+ - 137
+ parent: 163
+- id: 155
kind: RqOperator
span: 1:132-144
alias: price
targets:
- - 157
- 158
- parent: 161
-- id: 157
+ - 159
+ parent: 162
+- id: 158
kind: Literal
span: 1:143-144
-- id: 158
+- id: 159
kind: RqOperator
span: 1:108-129
targets:
- - 160
-- id: 160
+ - 161
+- id: 161
kind: Ident
span: 1:112-129
ident: !Ident
@@ -203,22 +203,22 @@ nodes:
- tracks
- unit_price
targets:
- - 119
-- id: 161
+ - 120
+- id: 162
kind: Tuple
span: 1:132-144
children:
- - 154
- parent: 162
-- id: 162
+ - 155
+ parent: 163
+- id: 163
kind: 'TransformCall: Aggregate'
span: 1:89-145
children:
- - 134
- - 161
- - 137
- parent: 167
-- id: 165
+ - 135
+ - 162
+ - 138
+ parent: 168
+- id: 166
kind: Ident
span: 1:152-160
ident: !Ident
@@ -226,14 +226,14 @@ nodes:
- a
- album_id
targets:
- - 135
- parent: 167
-- id: 167
+ - 136
+ parent: 168
+- id: 168
kind: 'TransformCall: Sort'
span: 1:147-160
children:
- - 162
- - 165
+ - 163
+ - 166
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 f5b8e7dd1fd7..40397974f7e7 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: 127
+ input_id: 128
except: []
- !Single
name:
- d
- target_id: 129
+ target_id: 130
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -25,15 +25,15 @@ frames:
- !Single
name:
- d
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- n1
- target_id: 152
+ target_id: 153
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -43,15 +43,15 @@ frames:
- !Single
name:
- d
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- n1
- target_id: 152
+ target_id: 153
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -61,15 +61,15 @@ frames:
- !Single
name:
- d
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- n1
- target_id: 152
+ target_id: 153
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -79,36 +79,36 @@ frames:
- !Single
name:
- d1
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- n1
- target_id: 166
+ target_id: 167
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 127
+- id: 128
kind: Ident
span: 1:13-24
ident: !Ident
- default_db
- tracks
- parent: 134
-- id: 129
+ parent: 135
+- id: 130
kind: RqOperator
span: 1:36-48
alias: d
targets:
- - 131
- 132
- parent: 133
-- id: 131
+ - 133
+ parent: 134
+- id: 132
kind: Ident
span: 1:36-44
ident: !Ident
@@ -116,46 +116,46 @@ nodes:
- tracks
- album_id
targets:
- - 127
-- id: 132
+ - 128
+- id: 133
kind: Literal
span: 1:47-48
-- id: 133
+- id: 134
kind: Tuple
span: 1:36-48
children:
- - 129
- parent: 134
-- id: 134
+ - 130
+ parent: 135
+- id: 135
kind: 'TransformCall: Derive'
span: 1:25-48
children:
- - 127
- - 133
- parent: 156
-- id: 135
+ - 128
+ - 134
+ parent: 157
+- id: 136
kind: Ident
span: 1:55-56
ident: !Ident
- this
- d
targets:
- - 129
- parent: 138
-- id: 138
+ - 130
+ parent: 139
+- id: 139
kind: Tuple
span: 1:55-56
children:
- - 135
- parent: 156
-- id: 152
+ - 136
+ parent: 157
+- id: 153
kind: RqOperator
span: 1:100-103
alias: n1
targets:
- - 154
- parent: 155
-- id: 154
+ - 155
+ parent: 156
+- id: 155
kind: Ident
span: 1:89-97
ident: !Ident
@@ -163,48 +163,48 @@ nodes:
- tracks
- track_id
targets:
- - 127
-- id: 155
+ - 128
+- id: 156
kind: Tuple
span: 1:73-111
children:
- - 152
- parent: 156
-- id: 156
+ - 153
+ parent: 157
+- id: 157
kind: 'TransformCall: Aggregate'
span: 1:63-111
children:
- - 134
- - 155
- - 138
- parent: 161
-- id: 159
+ - 135
+ - 156
+ - 139
+ parent: 162
+- id: 160
kind: Ident
span: 1:119-120
ident: !Ident
- this
- d
targets:
- - 135
- parent: 161
-- id: 161
+ - 136
+ parent: 162
+- id: 162
kind: 'TransformCall: Sort'
span: 1:114-120
children:
- - 156
- - 159
- parent: 163
-- id: 163
+ - 157
+ - 160
+ parent: 164
+- id: 164
kind: 'TransformCall: Take'
span: 1:121-128
children:
- - 161
- - 164
- parent: 168
-- id: 164
- kind: Literal
- parent: 163
+ - 162
+ - 165
+ parent: 169
- id: 165
+ kind: Literal
+ parent: 164
+- id: 166
kind: Ident
span: 1:143-144
alias: d1
@@ -212,30 +212,30 @@ nodes:
- this
- d
targets:
- - 135
- parent: 167
-- id: 166
+ - 136
+ parent: 168
+- id: 167
kind: Ident
span: 1:146-148
ident: !Ident
- this
- n1
targets:
- - 152
- parent: 167
-- id: 167
+ - 153
+ parent: 168
+- id: 168
kind: Tuple
span: 1:136-150
children:
- - 165
- 166
- parent: 168
-- id: 168
+ - 167
+ parent: 169
+- id: 169
kind: 'TransformCall: Select'
span: 1:129-150
children:
- - 163
- - 167
+ - 164
+ - 168
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 7e5692de57b0..4e86fdab7529 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_126
+ - _literal_127
- artist_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- album_title_count
- target_id: 146
+ target_id: 147
target_name: null
inputs:
- - id: 126
- name: _literal_126
+ - id: 127
+ name: _literal_127
table:
- default_db
- - _literal_126
+ - _literal_127
- - 1:119-164
- columns:
- !Single
name:
- - _literal_126
+ - _literal_127
- artist_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- album_title_count
- target_id: 146
+ target_id: 147
target_name: null
inputs:
- - id: 126
- name: _literal_126
+ - id: 127
+ name: _literal_127
table:
- default_db
- - _literal_126
+ - _literal_127
- - 1:165-214
- columns:
- !Single
name:
- - _literal_126
+ - _literal_127
- artist_id
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- album_title_count
- target_id: 146
+ target_id: 147
target_name: null
- !Single
name:
- new_album_count
- target_id: 156
+ target_id: 157
target_name: null
inputs:
- - id: 126
- name: _literal_126
+ - id: 127
+ name: _literal_127
table:
- default_db
- - _literal_126
+ - _literal_127
- - 1:215-260
- columns:
- !Single
name:
- - _literal_126
+ - _literal_127
- artist_id
- target_id: 159
+ target_id: 160
target_name: null
- !Single
name:
- new_album_count
- target_id: 160
+ target_id: 161
target_name: null
inputs:
- - id: 126
- name: _literal_126
+ - id: 127
+ name: _literal_127
table:
- default_db
- - _literal_126
+ - _literal_127
- - 1:261-367
- columns:
- !Single
name:
- - _literal_126
+ - _literal_127
- artist_id
- target_id: 159
+ target_id: 160
target_name: null
- !Single
name:
- new_album_count
- target_id: 160
+ target_id: 161
target_name: null
- !All
- input_id: 113
+ input_id: 114
except: []
inputs:
- - id: 126
- name: _literal_126
+ - id: 127
+ name: _literal_127
table:
- default_db
- - _literal_126
- - id: 113
- name: _literal_113
+ - _literal_127
+ - id: 114
+ name: _literal_114
table:
- default_db
- - _literal_113
+ - _literal_114
nodes:
-- id: 113
+- id: 114
kind: SString
span: 1:278-330
- parent: 167
-- id: 126
+ parent: 168
+- id: 127
kind: SString
span: 1:0-46
- parent: 149
-- id: 127
+ parent: 150
+- id: 128
kind: Ident
span: 1:54-63
ident: !Ident
- this
- - _literal_126
+ - _literal_127
- artist_id
targets:
- - 126
- parent: 128
-- id: 128
+ - 127
+ parent: 129
+- id: 129
kind: Tuple
span: 1:53-64
children:
- - 127
- parent: 149
-- id: 146
+ - 128
+ parent: 150
+- id: 147
kind: RqOperator
span: 1:98-116
alias: album_title_count
targets:
- - 147
- parent: 148
-- id: 147
- kind: Literal
+ - 148
+ parent: 149
- id: 148
+ kind: Literal
+- id: 149
kind: Tuple
span: 1:76-117
children:
- - 146
- parent: 149
-- id: 149
+ - 147
+ parent: 150
+- id: 150
kind: 'TransformCall: Aggregate'
span: 1:66-117
children:
- - 126
- - 148
- - 128
- parent: 155
-- id: 152
+ - 127
+ - 149
+ - 129
+ parent: 156
+- id: 153
kind: Ident
span: 1:125-139
ident: !Ident
- this
- - _literal_126
+ - _literal_127
- artist_id
targets:
- - 127
- parent: 155
-- id: 153
+ - 128
+ parent: 156
+- id: 154
kind: Ident
span: 1:141-163
ident: !Ident
- this
- album_title_count
targets:
- - 146
- parent: 155
-- id: 155
+ - 147
+ parent: 156
+- id: 156
kind: 'TransformCall: Sort'
span: 1:119-164
children:
- - 149
- - 152
+ - 150
- 153
- parent: 158
-- id: 156
+ - 154
+ parent: 159
+- id: 157
kind: Ident
span: 1:191-213
alias: new_album_count
@@ -195,86 +195,86 @@ nodes:
- this
- album_title_count
targets:
- - 146
- parent: 157
-- id: 157
+ - 147
+ parent: 158
+- id: 158
kind: Tuple
span: 1:172-214
children:
- - 156
- parent: 158
-- id: 158
+ - 157
+ parent: 159
+- id: 159
kind: 'TransformCall: Derive'
span: 1:165-214
children:
- - 155
- - 157
- parent: 162
-- id: 159
+ - 156
+ - 158
+ parent: 163
+- id: 160
kind: Ident
span: 1:223-237
ident: !Ident
- this
- - _literal_126
+ - _literal_127
- artist_id
targets:
- - 127
- parent: 161
-- id: 160
+ - 128
+ parent: 162
+- id: 161
kind: Ident
span: 1:239-259
ident: !Ident
- this
- new_album_count
targets:
- - 156
- parent: 161
-- id: 161
+ - 157
+ parent: 162
+- id: 162
kind: Tuple
span: 1:222-260
children:
- - 159
- 160
- parent: 162
-- id: 162
+ - 161
+ parent: 163
+- id: 163
kind: 'TransformCall: Select'
span: 1:215-260
children:
- - 158
- - 161
- parent: 167
-- id: 163
+ - 159
+ - 162
+ parent: 168
+- id: 164
kind: RqOperator
span: 1:334-366
targets:
- - 165
- 166
- parent: 167
-- id: 165
+ - 167
+ parent: 168
+- id: 166
kind: Ident
span: 1:334-348
ident: !Ident
- this
- - _literal_126
+ - _literal_127
- artist_id
targets:
- - 159
-- id: 166
+ - 160
+- id: 167
kind: Ident
span: 1:352-366
ident: !Ident
- that
- - _literal_113
+ - _literal_114
- artist_id
targets:
- - 113
-- id: 167
+ - 114
+- id: 168
kind: 'TransformCall: Join'
span: 1:261-367
children:
- - 162
- - 113
- 163
+ - 114
+ - 164
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 4b5c1093b2c0..e1e429ef9634 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_129
+ - _literal_130
- artist_id
- target_id: 130
+ target_id: 131
target_name: null
- !Single
name:
- album_title_count
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:119-164
- columns:
- !Single
name:
- - _literal_129
+ - _literal_130
- artist_id
- target_id: 130
+ target_id: 131
target_name: null
- !Single
name:
- album_title_count
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:165-201
- columns:
- !Single
name:
- - _literal_129
+ - _literal_130
- artist_id
- target_id: 130
+ target_id: 131
target_name: null
- !Single
name:
- album_title_count
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:202-251
- columns:
- !Single
name:
- - _literal_129
+ - _literal_130
- artist_id
- target_id: 130
+ target_id: 131
target_name: null
- !Single
name:
- album_title_count
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- new_album_count
- target_id: 164
+ target_id: 165
target_name: null
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:252-297
- columns:
- !Single
name:
- - _literal_129
+ - _literal_130
- artist_id
- target_id: 167
+ target_id: 168
target_name: null
- !Single
name:
- new_album_count
- target_id: 168
+ target_id: 169
target_name: null
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:298-404
- columns:
- !Single
name:
- - _literal_129
+ - _literal_130
- artist_id
- target_id: 167
+ target_id: 168
target_name: null
- !Single
name:
- new_album_count
- target_id: 168
+ target_id: 169
target_name: null
- !All
- input_id: 113
+ input_id: 114
except: []
inputs:
- - id: 129
- name: _literal_129
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
- - id: 113
- name: _literal_113
+ - _literal_130
+ - id: 114
+ name: _literal_114
table:
- default_db
- - _literal_113
+ - _literal_114
nodes:
-- id: 113
+- id: 114
kind: SString
span: 1:315-367
- parent: 175
-- id: 129
+ parent: 176
+- id: 130
kind: SString
span: 1:0-46
- parent: 152
-- id: 130
+ parent: 153
+- id: 131
kind: Ident
span: 1:54-63
ident: !Ident
- this
- - _literal_129
+ - _literal_130
- artist_id
targets:
- - 129
- parent: 131
-- id: 131
+ - 130
+ parent: 132
+- id: 132
kind: Tuple
span: 1:53-64
children:
- - 130
- parent: 152
-- id: 149
+ - 131
+ parent: 153
+- id: 150
kind: RqOperator
span: 1:98-116
alias: album_title_count
targets:
- - 150
- parent: 151
-- id: 150
- kind: Literal
+ - 151
+ parent: 152
- id: 151
+ kind: Literal
+- id: 152
kind: Tuple
span: 1:76-117
children:
- - 149
- parent: 152
-- id: 152
+ - 150
+ parent: 153
+- id: 153
kind: 'TransformCall: Aggregate'
span: 1:66-117
children:
- - 129
- - 151
- - 131
- parent: 158
-- id: 155
+ - 130
+ - 152
+ - 132
+ parent: 159
+- id: 156
kind: Ident
span: 1:125-139
ident: !Ident
- this
- - _literal_129
+ - _literal_130
- artist_id
targets:
- - 130
- parent: 158
-- id: 156
+ - 131
+ parent: 159
+- id: 157
kind: Ident
span: 1:141-163
ident: !Ident
- this
- album_title_count
targets:
- - 149
- parent: 158
-- id: 158
+ - 150
+ parent: 159
+- id: 159
kind: 'TransformCall: Sort'
span: 1:119-164
children:
- - 152
- - 155
+ - 153
- 156
- parent: 163
-- id: 159
+ - 157
+ parent: 164
+- id: 160
kind: RqOperator
span: 1:172-201
targets:
- - 161
- 162
- parent: 163
-- id: 161
+ - 163
+ parent: 164
+- id: 162
kind: Ident
span: 1:173-195
ident: !Ident
- this
- album_title_count
targets:
- - 149
-- id: 162
+ - 150
+- id: 163
kind: Literal
span: 1:199-201
-- id: 163
+- id: 164
kind: 'TransformCall: Filter'
span: 1:165-201
children:
- - 158
- 159
- parent: 166
-- id: 164
+ - 160
+ parent: 167
+- id: 165
kind: Ident
span: 1:228-250
alias: new_album_count
@@ -239,86 +239,86 @@ nodes:
- this
- album_title_count
targets:
- - 149
- parent: 165
-- id: 165
+ - 150
+ parent: 166
+- id: 166
kind: Tuple
span: 1:209-251
children:
- - 164
- parent: 166
-- id: 166
+ - 165
+ parent: 167
+- id: 167
kind: 'TransformCall: Derive'
span: 1:202-251
children:
- - 163
- - 165
- parent: 170
-- id: 167
+ - 164
+ - 166
+ parent: 171
+- id: 168
kind: Ident
span: 1:260-274
ident: !Ident
- this
- - _literal_129
+ - _literal_130
- artist_id
targets:
- - 130
- parent: 169
-- id: 168
+ - 131
+ parent: 170
+- id: 169
kind: Ident
span: 1:276-296
ident: !Ident
- this
- new_album_count
targets:
- - 164
- parent: 169
-- id: 169
+ - 165
+ parent: 170
+- id: 170
kind: Tuple
span: 1:259-297
children:
- - 167
- 168
- parent: 170
-- id: 170
+ - 169
+ parent: 171
+- id: 171
kind: 'TransformCall: Select'
span: 1:252-297
children:
- - 166
- - 169
- parent: 175
-- id: 171
+ - 167
+ - 170
+ parent: 176
+- id: 172
kind: RqOperator
span: 1:371-403
targets:
- - 173
- 174
- parent: 175
-- id: 173
+ - 175
+ parent: 176
+- id: 174
kind: Ident
span: 1:371-385
ident: !Ident
- this
- - _literal_129
+ - _literal_130
- artist_id
targets:
- - 167
-- id: 174
+ - 168
+- id: 175
kind: Ident
span: 1:389-403
ident: !Ident
- that
- - _literal_113
+ - _literal_114
- artist_id
targets:
- - 113
-- id: 175
+ - 114
+- id: 176
kind: 'TransformCall: Join'
span: 1:298-404
children:
- - 170
- - 113
- 171
+ - 114
+ - 172
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 f65b3b70809c..1e80ae35d3bc 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: 130
+ target_id: 131
target_name: null
- !Single
name:
- tracks
- milliseconds
- target_id: 131
+ target_id: 132
target_name: null
inputs:
- - id: 128
+ - id: 129
name: tracks
table:
- default_db
@@ -30,16 +30,16 @@ frames:
name:
- tracks
- genre_id
- target_id: 134
+ target_id: 135
target_name: null
- !Single
name:
- tracks
- milliseconds
- target_id: 131
+ target_id: 132
target_name: null
inputs:
- - id: 128
+ - id: 129
name: tracks
table:
- default_db
@@ -50,24 +50,24 @@ frames:
name:
- tracks
- genre_id
- target_id: 134
+ target_id: 135
target_name: null
- !Single
name:
- tracks
- milliseconds
- target_id: 131
+ target_id: 132
target_name: null
- !All
- input_id: 119
+ input_id: 120
except: []
inputs:
- - id: 128
+ - id: 129
name: tracks
table:
- default_db
- tracks
- - id: 119
+ - id: 120
name: genres
table:
- default_db
@@ -78,21 +78,21 @@ frames:
name:
- genres
- name
- target_id: 172
+ target_id: 173
target_name: null
- !Single
name:
- tracks
- milliseconds
- target_id: 173
+ target_id: 174
target_name: null
inputs:
- - id: 128
+ - id: 129
name: tracks
table:
- default_db
- tracks
- - id: 119
+ - id: 120
name: genres
table:
- default_db
@@ -103,41 +103,41 @@ frames:
name:
- genres
- name
- target_id: 172
+ target_id: 173
target_name: null
- !Single
name:
- tracks
- milliseconds
- target_id: 173
+ target_id: 174
target_name: null
inputs:
- - id: 128
+ - id: 129
name: tracks
table:
- default_db
- tracks
- - id: 119
+ - id: 120
name: genres
table:
- default_db
- genres
nodes:
-- id: 119
+- id: 120
kind: Ident
span: 1:177-183
ident: !Ident
- default_db
- genres
- parent: 171
-- id: 128
+ parent: 172
+- id: 129
kind: Ident
span: 1:76-87
ident: !Ident
- default_db
- tracks
- parent: 133
-- id: 130
+ parent: 134
+- id: 131
kind: Ident
span: 1:96-104
ident: !Ident
@@ -145,9 +145,9 @@ nodes:
- tracks
- genre_id
targets:
- - 128
- parent: 132
-- id: 131
+ - 129
+ parent: 133
+- id: 132
kind: Ident
span: 1:105-117
ident: !Ident
@@ -155,23 +155,23 @@ nodes:
- tracks
- milliseconds
targets:
- - 128
- parent: 132
-- id: 132
+ - 129
+ parent: 133
+- id: 133
kind: Tuple
span: 1:95-118
children:
- - 130
- 131
- parent: 133
-- id: 133
+ - 132
+ parent: 134
+- id: 134
kind: 'TransformCall: Select'
span: 1:88-118
children:
- - 128
- - 132
- parent: 163
-- id: 134
+ - 129
+ - 133
+ parent: 164
+- id: 135
kind: Ident
span: 1:126-134
ident: !Ident
@@ -179,14 +179,14 @@ nodes:
- tracks
- genre_id
targets:
- - 130
- parent: 135
-- id: 135
+ - 131
+ parent: 136
+- id: 136
kind: Tuple
span: 1:125-135
children:
- - 134
-- id: 159
+ - 135
+- id: 160
kind: Ident
span: 1:147-159
ident: !Ident
@@ -194,25 +194,25 @@ nodes:
- tracks
- milliseconds
targets:
- - 131
-- id: 163
+ - 132
+- id: 164
kind: 'TransformCall: Take'
span: 1:163-169
children:
- - 133
- - 164
- parent: 171
-- id: 164
+ - 134
+ - 165
+ parent: 172
+- id: 165
kind: Literal
- parent: 163
-- id: 167
+ parent: 164
+- id: 168
kind: RqOperator
span: 1:185-195
targets:
- - 169
- 170
- parent: 171
-- id: 169
+ - 171
+ parent: 172
+- id: 170
kind: Ident
span: 1:187-195
ident: !Ident
@@ -220,8 +220,8 @@ nodes:
- tracks
- genre_id
targets:
- - 134
-- id: 170
+ - 135
+- id: 171
kind: Ident
span: 1:187-195
ident: !Ident
@@ -229,16 +229,16 @@ nodes:
- genres
- genre_id
targets:
- - 119
-- id: 171
+ - 120
+- id: 172
kind: 'TransformCall: Join'
span: 1:172-196
children:
- - 163
- - 119
- - 167
- parent: 175
-- id: 172
+ - 164
+ - 120
+ - 168
+ parent: 176
+- id: 173
kind: Ident
span: 1:205-209
ident: !Ident
@@ -246,9 +246,9 @@ nodes:
- genres
- name
targets:
- - 119
- parent: 174
-- id: 173
+ - 120
+ parent: 175
+- id: 174
kind: Ident
span: 1:211-223
ident: !Ident
@@ -256,23 +256,23 @@ nodes:
- tracks
- milliseconds
targets:
- - 131
- parent: 174
-- id: 174
+ - 132
+ parent: 175
+- id: 175
kind: Tuple
span: 1:204-224
children:
- - 172
- 173
- parent: 175
-- id: 175
+ - 174
+ parent: 176
+- id: 176
kind: 'TransformCall: Select'
span: 1:197-224
children:
- - 171
- - 174
- parent: 181
-- id: 176
+ - 172
+ - 175
+ parent: 182
+- id: 177
kind: Ident
span: 1:231-236
ident: !Ident
@@ -280,9 +280,9 @@ nodes:
- genres
- name
targets:
- - 172
- parent: 181
-- id: 179
+ - 173
+ parent: 182
+- id: 180
kind: Ident
span: 1:238-250
ident: !Ident
@@ -290,15 +290,15 @@ nodes:
- tracks
- milliseconds
targets:
- - 173
- parent: 181
-- id: 181
+ - 174
+ parent: 182
+- id: 182
kind: 'TransformCall: Sort'
span: 1:225-251
children:
- - 175
- 176
- - 179
+ - 177
+ - 180
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 7ab172cadbdf..17babc3580b1 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: 137
+ input_id: 138
except: []
- !All
- input_id: 134
+ input_id: 135
except: []
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -26,28 +26,28 @@ frames:
- - 1:184-253
- columns:
- !All
- input_id: 137
+ input_id: 138
except: []
- !All
- input_id: 134
+ input_id: 135
except: []
- !Single
name:
- city
- target_id: 144
+ target_id: 145
target_name: null
- !Single
name:
- street
- target_id: 145
+ target_id: 146
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -55,23 +55,23 @@ frames:
- - 1:281-323
- columns:
- !All
- input_id: 137
+ input_id: 138
except: []
- !All
- input_id: 134
+ input_id: 135
except: []
- !Single
name:
- total
- target_id: 175
+ target_id: 176
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -81,35 +81,35 @@ frames:
- !Single
name:
- city
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- street
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- num_orders
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- num_tracks
- target_id: 184
+ target_id: 185
target_name: null
- !Single
name:
- total_price
- target_id: 187
+ target_id: 188
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -119,40 +119,40 @@ frames:
- !Single
name:
- city
- target_id: 194
+ target_id: 195
target_name: null
- !Single
name:
- street
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- num_orders
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- num_tracks
- target_id: 184
+ target_id: 185
target_name: null
- !Single
name:
- total_price
- target_id: 187
+ target_id: 188
target_name: null
- !Single
name:
- running_total_num_tracks
- target_id: 240
+ target_id: 241
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -162,40 +162,40 @@ frames:
- !Single
name:
- city
- target_id: 194
+ target_id: 195
target_name: null
- !Single
name:
- street
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- num_orders
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- num_tracks
- target_id: 184
+ target_id: 185
target_name: null
- !Single
name:
- total_price
- target_id: 187
+ target_id: 188
target_name: null
- !Single
name:
- running_total_num_tracks
- target_id: 240
+ target_id: 241
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -205,45 +205,45 @@ frames:
- !Single
name:
- city
- target_id: 194
+ target_id: 195
target_name: null
- !Single
name:
- street
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- num_orders
- target_id: 181
+ target_id: 182
target_name: null
- !Single
name:
- num_tracks
- target_id: 184
+ target_id: 185
target_name: null
- !Single
name:
- total_price
- target_id: 187
+ target_id: 188
target_name: null
- !Single
name:
- running_total_num_tracks
- target_id: 240
+ target_id: 241
target_name: null
- !Single
name:
- num_tracks_last_week
- target_id: 254
+ target_id: 255
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -253,40 +253,40 @@ frames:
- !Single
name:
- city
- target_id: 260
+ target_id: 261
target_name: null
- !Single
name:
- street
- target_id: 261
+ target_id: 262
target_name: null
- !Single
name:
- num_orders
- target_id: 262
+ target_id: 263
target_name: null
- !Single
name:
- num_tracks
- target_id: 263
+ target_id: 264
target_name: null
- !Single
name:
- running_total_num_tracks
- target_id: 264
+ target_id: 265
target_name: null
- !Single
name:
- num_tracks_last_week
- target_id: 265
+ target_id: 266
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
@@ -296,67 +296,67 @@ frames:
- !Single
name:
- city
- target_id: 260
+ target_id: 261
target_name: null
- !Single
name:
- street
- target_id: 261
+ target_id: 262
target_name: null
- !Single
name:
- num_orders
- target_id: 262
+ target_id: 263
target_name: null
- !Single
name:
- num_tracks
- target_id: 263
+ target_id: 264
target_name: null
- !Single
name:
- running_total_num_tracks
- target_id: 264
+ target_id: 265
target_name: null
- !Single
name:
- num_tracks_last_week
- target_id: 265
+ target_id: 266
target_name: null
inputs:
- - id: 137
+ - id: 138
name: i
table:
- default_db
- invoices
- - id: 134
+ - id: 135
name: ii
table:
- default_db
- invoice_items
nodes:
-- id: 134
+- id: 135
kind: Ident
span: 1:155-168
ident: !Ident
- default_db
- invoice_items
- parent: 143
-- id: 137
+ parent: 144
+- id: 138
kind: Ident
span: 1:131-146
ident: !Ident
- default_db
- invoices
- parent: 143
-- id: 139
+ parent: 144
+- id: 140
kind: RqOperator
span: 1:170-182
targets:
- - 141
- 142
- parent: 143
-- id: 141
+ - 143
+ parent: 144
+- id: 142
kind: Ident
span: 1:172-182
ident: !Ident
@@ -364,8 +364,8 @@ nodes:
- i
- invoice_id
targets:
- - 137
-- id: 142
+ - 138
+- id: 143
kind: Ident
span: 1:172-182
ident: !Ident
@@ -373,16 +373,16 @@ nodes:
- ii
- invoice_id
targets:
- - 134
-- id: 143
+ - 135
+- id: 144
kind: 'TransformCall: Join'
span: 1:147-183
children:
- - 137
- - 134
- - 139
- parent: 147
-- id: 144
+ - 138
+ - 135
+ - 140
+ parent: 148
+- id: 145
kind: Ident
span: 1:204-218
alias: city
@@ -391,9 +391,9 @@ nodes:
- i
- billing_city
targets:
- - 137
- parent: 146
-- id: 145
+ - 138
+ parent: 147
+- id: 146
kind: Ident
span: 1:233-250
alias: street
@@ -402,56 +402,56 @@ nodes:
- i
- billing_address
targets:
- - 137
- parent: 146
-- id: 146
+ - 138
+ parent: 147
+- id: 147
kind: Tuple
span: 1:191-253
children:
- - 144
- 145
- parent: 147
-- id: 147
+ - 146
+ parent: 148
+- id: 148
kind: 'TransformCall: Derive'
span: 1:184-253
children:
- - 143
- - 146
- parent: 180
-- id: 148
+ - 144
+ - 147
+ parent: 181
+- id: 149
kind: Ident
span: 1:261-265
ident: !Ident
- this
- city
targets:
- - 144
- parent: 150
-- id: 149
+ - 145
+ parent: 151
+- id: 150
kind: Ident
span: 1:267-273
ident: !Ident
- this
- street
targets:
- - 145
- parent: 150
-- id: 150
+ - 146
+ parent: 151
+- id: 151
kind: Tuple
span: 1:260-274
children:
- - 148
- 149
- parent: 191
-- id: 175
+ - 150
+ parent: 192
+- id: 176
kind: RqOperator
span: 1:296-323
alias: total
targets:
- - 177
- 178
- parent: 179
-- id: 177
+ - 179
+ parent: 180
+- id: 178
kind: Ident
span: 1:296-309
ident: !Ident
@@ -459,8 +459,8 @@ nodes:
- ii
- unit_price
targets:
- - 134
-- id: 178
+ - 135
+- id: 179
kind: Ident
span: 1:312-323
ident: !Ident
@@ -468,28 +468,28 @@ nodes:
- ii
- quantity
targets:
- - 134
-- id: 179
+ - 135
+- id: 180
kind: Tuple
span: 1:296-323
children:
- - 175
- parent: 180
-- id: 180
+ - 176
+ parent: 181
+- id: 181
kind: 'TransformCall: Derive'
span: 1:281-323
children:
- - 147
- - 179
- parent: 191
-- id: 181
+ - 148
+ - 180
+ parent: 192
+- id: 182
kind: RqOperator
span: 1:361-388
alias: num_orders
targets:
- - 183
- parent: 190
-- id: 183
+ - 184
+ parent: 191
+- id: 184
kind: Ident
span: 1:376-388
ident: !Ident
@@ -497,15 +497,15 @@ nodes:
- i
- invoice_id
targets:
- - 137
-- id: 184
+ - 138
+- id: 185
kind: RqOperator
span: 1:411-426
alias: num_tracks
targets:
- - 186
- parent: 190
-- id: 186
+ - 187
+ parent: 191
+- id: 187
kind: Ident
span: 1:415-426
ident: !Ident
@@ -513,229 +513,229 @@ nodes:
- ii
- quantity
targets:
- - 134
-- id: 187
+ - 135
+- id: 188
kind: RqOperator
span: 1:450-459
alias: total_price
targets:
- - 189
- parent: 190
-- id: 189
+ - 190
+ parent: 191
+- id: 190
kind: Ident
span: 1:454-459
ident: !Ident
- this
- total
targets:
- - 175
-- id: 190
+ - 176
+- id: 191
kind: Tuple
span: 1:338-466
children:
- - 181
- - 184
- - 187
- parent: 191
-- id: 191
+ - 182
+ - 185
+ - 188
+ parent: 192
+- id: 192
kind: 'TransformCall: Aggregate'
span: 1:328-466
children:
- - 180
- - 190
- - 150
- parent: 244
-- id: 194
+ - 181
+ - 191
+ - 151
+ parent: 245
+- id: 195
kind: Ident
span: 1:476-480
ident: !Ident
- this
- city
targets:
- - 148
- parent: 195
-- id: 195
+ - 149
+ parent: 196
+- id: 196
kind: Tuple
span: 1:475-481
children:
- - 194
-- id: 219
+ - 195
+- id: 220
kind: Ident
span: 1:493-499
ident: !Ident
- this
- street
targets:
- - 149
-- id: 240
+ - 150
+- id: 241
kind: RqOperator
span: 1:571-585
alias: running_total_num_tracks
targets:
- - 242
- parent: 243
-- id: 242
+ - 243
+ parent: 244
+- id: 243
kind: Ident
span: 1:575-585
ident: !Ident
- this
- num_tracks
targets:
- - 184
-- id: 243
+ - 185
+- id: 244
kind: Tuple
span: 1:543-586
children:
- - 240
- parent: 244
-- id: 244
+ - 241
+ parent: 245
+- id: 245
kind: 'TransformCall: Derive'
span: 1:536-586
children:
- - 191
- - 243
- parent: 253
-- id: 246
+ - 192
+ - 244
+ parent: 254
+- id: 247
kind: Literal
-- id: 250
+- id: 251
kind: Ident
span: 1:601-605
ident: !Ident
- this
- city
targets:
- - 194
- parent: 253
-- id: 251
+ - 195
+ parent: 254
+- id: 252
kind: Ident
span: 1:607-613
ident: !Ident
- this
- street
targets:
- - 149
- parent: 253
-- id: 253
+ - 150
+ parent: 254
+- id: 254
kind: 'TransformCall: Sort'
span: 1:595-614
children:
- - 244
- - 250
+ - 245
- 251
- parent: 259
-- id: 254
+ - 252
+ parent: 260
+- id: 255
kind: RqOperator
span: 1:646-662
alias: num_tracks_last_week
targets:
- - 256
- 257
- parent: 258
-- id: 256
+ - 258
+ parent: 259
+- id: 257
kind: Literal
span: 1:650-651
-- id: 257
+- id: 258
kind: Ident
span: 1:652-662
ident: !Ident
- this
- num_tracks
targets:
- - 184
-- id: 258
+ - 185
+- id: 259
kind: Tuple
span: 1:622-663
children:
- - 254
- parent: 259
-- id: 259
+ - 255
+ parent: 260
+- id: 260
kind: 'TransformCall: Derive'
span: 1:615-663
children:
- - 253
- - 258
- parent: 267
-- id: 260
+ - 254
+ - 259
+ parent: 268
+- id: 261
kind: Ident
span: 1:677-681
ident: !Ident
- this
- city
targets:
- - 194
- parent: 266
-- id: 261
+ - 195
+ parent: 267
+- id: 262
kind: Ident
span: 1:687-693
ident: !Ident
- this
- street
targets:
- - 149
- parent: 266
-- id: 262
+ - 150
+ parent: 267
+- id: 263
kind: Ident
span: 1:699-709
ident: !Ident
- this
- num_orders
targets:
- - 181
- parent: 266
-- id: 263
+ - 182
+ parent: 267
+- id: 264
kind: Ident
span: 1:715-725
ident: !Ident
- this
- num_tracks
targets:
- - 184
- parent: 266
-- id: 264
+ - 185
+ parent: 267
+- id: 265
kind: Ident
span: 1:731-755
ident: !Ident
- this
- running_total_num_tracks
targets:
- - 240
- parent: 266
-- id: 265
+ - 241
+ parent: 267
+- id: 266
kind: Ident
span: 1:761-781
ident: !Ident
- this
- num_tracks_last_week
targets:
- - 254
- parent: 266
-- id: 266
+ - 255
+ parent: 267
+- id: 267
kind: Tuple
span: 1:671-783
children:
- - 260
- 261
- 262
- 263
- 264
- 265
- parent: 267
-- id: 267
+ - 266
+ parent: 268
+- id: 268
kind: 'TransformCall: Select'
span: 1:664-783
children:
- - 259
- - 266
- parent: 269
-- id: 269
+ - 260
+ - 267
+ parent: 270
+- id: 270
kind: 'TransformCall: Take'
span: 1:784-791
children:
- - 267
- - 270
-- id: 270
+ - 268
+ - 271
+- id: 271
kind: Literal
- parent: 269
+ parent: 270
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 4a2dfb0684ea..ac0d444fd66d 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: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
- - 1:200-212
- columns:
- !Single
name:
- n
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
- - 1:215-231
- columns:
- !Single
name:
- n
- target_id: 151
+ target_id: 152
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
- - 1:194-232
- columns:
- !Single
name:
- n
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
- - 1:233-249
- columns:
- !Single
name:
- n
- target_id: 159
+ target_id: 160
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
- - 1:250-256
- columns:
- !Single
name:
- n
- target_id: 159
+ target_id: 160
target_name: null
inputs:
- - id: 124
- name: _literal_124
+ - id: 125
+ name: _literal_125
table:
- default_db
- - _literal_124
+ - _literal_125
nodes:
-- id: 124
+- id: 125
kind: Array
span: 1:162-176
children:
- - 125
- parent: 133
-- id: 125
+ - 126
+ parent: 134
+- id: 126
kind: Tuple
span: 1:168-175
children:
- - 126
- parent: 124
-- id: 126
+ - 127
+ parent: 125
+- id: 127
kind: Literal
span: 1:173-174
alias: n
- parent: 125
-- id: 128
+ parent: 126
+- id: 129
kind: RqOperator
span: 1:188-193
alias: n
targets:
- - 130
- 131
- parent: 132
-- id: 130
+ - 132
+ parent: 133
+- id: 131
kind: Ident
span: 1:188-189
ident: !Ident
- this
- - _literal_124
+ - _literal_125
- n
targets:
- - 124
-- id: 131
+ - 125
+- id: 132
kind: Literal
span: 1:192-193
-- id: 132
+- id: 133
kind: Tuple
span: 1:188-193
children:
- - 128
- parent: 133
-- id: 133
+ - 129
+ parent: 134
+- id: 134
kind: 'TransformCall: Select'
span: 1:177-193
children:
- - 124
- - 132
- parent: 157
-- id: 142
+ - 125
+ - 133
+ parent: 158
+- id: 143
kind: Ident
ident: !Ident
- _param
- _tbl
targets:
- - 139
- parent: 150
-- id: 146
+ - 140
+ parent: 151
+- id: 147
kind: RqOperator
span: 1:207-212
targets:
- - 148
- 149
- parent: 150
-- id: 148
+ - 150
+ parent: 151
+- id: 149
kind: Ident
span: 1:207-208
ident: !Ident
- this
- n
targets:
- - 128
-- id: 149
+ - 129
+- id: 150
kind: Literal
span: 1:211-212
-- id: 150
+- id: 151
kind: 'TransformCall: Filter'
span: 1:200-212
children:
- - 142
- - 146
- parent: 156
-- id: 151
+ - 143
+ - 147
+ parent: 157
+- id: 152
kind: RqOperator
span: 1:226-231
alias: n
targets:
- - 153
- 154
- parent: 155
-- id: 153
+ - 155
+ parent: 156
+- id: 154
kind: Ident
span: 1:226-227
ident: !Ident
- this
- n
targets:
- - 128
-- id: 154
+ - 129
+- id: 155
kind: Literal
span: 1:230-231
-- id: 155
+- id: 156
kind: Tuple
span: 1:226-231
children:
- - 151
- parent: 156
-- id: 156
+ - 152
+ parent: 157
+- id: 157
kind: 'TransformCall: Select'
span: 1:215-231
children:
- - 150
- - 155
-- id: 157
+ - 151
+ - 156
+- id: 158
kind: 'TransformCall: Loop'
span: 1:194-232
children:
- - 133
- - 158
- parent: 164
-- id: 158
+ - 134
+ - 159
+ parent: 165
+- id: 159
kind: Func
span: 1:215-231
- parent: 157
-- id: 159
+ parent: 158
+- id: 160
kind: RqOperator
span: 1:244-249
alias: n
targets:
- - 161
- 162
- parent: 163
-- id: 161
+ - 163
+ parent: 164
+- id: 162
kind: Ident
span: 1:244-245
ident: !Ident
- this
- n
targets:
- - 128
-- id: 162
+ - 129
+- id: 163
kind: Literal
span: 1:248-249
-- id: 163
+- id: 164
kind: Tuple
span: 1:244-249
children:
- - 159
- parent: 164
-- id: 164
+ - 160
+ parent: 165
+- id: 165
kind: 'TransformCall: Select'
span: 1:233-249
children:
- - 157
- - 163
- parent: 167
-- id: 165
+ - 158
+ - 164
+ parent: 168
+- id: 166
kind: Ident
span: 1:255-256
ident: !Ident
- this
- n
targets:
- - 159
- parent: 167
-- id: 167
+ - 160
+ parent: 168
+- id: 168
kind: 'TransformCall: Sort'
span: 1:250-256
children:
- - 164
- 165
+ - 166
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 574091df21dd..6134c27672f1 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: 118
+ input_id: 119
except: []
inputs:
- - id: 118
+ - id: 119
name: invoices
table:
- default_db
@@ -20,109 +20,109 @@ frames:
- !Single
name:
- total_original
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- total_x
- target_id: 128
+ target_id: 129
target_name: null
- !Single
name:
- total_floor
- target_id: 139
+ target_id: 140
target_name: null
- !Single
name:
- total_ceil
- target_id: 142
+ target_id: 143
target_name: null
- !Single
name:
- total_log10
- target_id: 145
+ target_id: 146
target_name: null
- !Single
name:
- total_log2
- target_id: 152
+ target_id: 153
target_name: null
- !Single
name:
- total_sqrt
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name:
- total_ln
- target_id: 167
+ target_id: 168
target_name: null
- !Single
name:
- total_cos
- target_id: 176
+ target_id: 177
target_name: null
- !Single
name:
- total_sin
- target_id: 185
+ target_id: 186
target_name: null
- !Single
name:
- total_tan
- target_id: 194
+ target_id: 195
target_name: null
- !Single
name:
- total_deg
- target_id: 203
+ target_id: 204
target_name: null
- !Single
name:
- total_square
- target_id: 212
+ target_id: 213
target_name: null
- !Single
name:
- total_square_op
- target_id: 221
+ target_id: 222
target_name: null
inputs:
- - id: 118
+ - id: 119
name: invoices
table:
- default_db
- invoices
nodes:
-- id: 118
+- id: 119
kind: Ident
span: 1:82-95
ident: !Ident
- default_db
- invoices
- parent: 121
-- id: 121
+ parent: 122
+- id: 122
kind: 'TransformCall: Take'
span: 1:96-102
children:
- - 118
- - 122
- parent: 230
-- id: 122
- kind: Literal
- parent: 121
+ - 119
+ - 123
+ parent: 231
- id: 123
+ kind: Literal
+ parent: 122
+- id: 124
kind: RqOperator
span: 1:142-154
alias: total_original
targets:
- - 126
- 127
- parent: 229
-- id: 126
+ - 128
+ parent: 230
+- id: 127
kind: Literal
span: 1:153-154
-- id: 127
+- id: 128
kind: Ident
span: 1:134-139
ident: !Ident
@@ -130,33 +130,33 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 128
+ - 119
+- id: 129
kind: RqOperator
span: 1:205-213
alias: total_x
targets:
- - 130
- parent: 229
-- id: 130
+ - 131
+ parent: 230
+- id: 131
kind: RqOperator
span: 1:190-202
targets:
- - 133
- 134
-- id: 133
+ - 135
+- id: 134
kind: Literal
span: 1:201-202
-- id: 134
+- id: 135
kind: RqOperator
span: 1:172-187
targets:
- - 137
- 138
-- id: 137
+ - 139
+- id: 138
kind: RqOperator
span: 1:172-179
-- id: 138
+- id: 139
kind: Ident
span: 1:182-187
ident: !Ident
@@ -164,15 +164,15 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 139
+ - 119
+- id: 140
kind: RqOperator
span: 1:234-252
alias: total_floor
targets:
- - 141
- parent: 229
-- id: 141
+ - 142
+ parent: 230
+- id: 142
kind: Ident
span: 1:246-251
ident: !Ident
@@ -180,15 +180,15 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 142
+ - 119
+- id: 143
kind: RqOperator
span: 1:271-288
alias: total_ceil
targets:
- - 144
- parent: 229
-- id: 144
+ - 145
+ parent: 230
+- id: 145
kind: Ident
span: 1:282-287
ident: !Ident
@@ -196,24 +196,24 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 145
+ - 119
+- id: 146
kind: RqOperator
span: 1:328-340
alias: total_log10
targets:
- - 148
- 149
- parent: 229
-- id: 148
+ - 150
+ parent: 230
+- id: 149
kind: Literal
span: 1:339-340
-- id: 149
+- id: 150
kind: RqOperator
span: 1:309-325
targets:
- - 151
-- id: 151
+ - 152
+- id: 152
kind: Ident
span: 1:320-325
ident: !Ident
@@ -221,28 +221,28 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 152
+ - 119
+- id: 153
kind: RqOperator
span: 1:380-392
alias: total_log2
targets:
- - 155
- 156
- parent: 229
-- id: 155
+ - 157
+ parent: 230
+- id: 156
kind: Literal
span: 1:391-392
-- id: 156
+- id: 157
kind: RqOperator
span: 1:361-377
targets:
- - 158
- 159
-- id: 158
+ - 160
+- id: 159
kind: Literal
span: 1:370-371
-- id: 159
+- id: 160
kind: Ident
span: 1:372-377
ident: !Ident
@@ -250,24 +250,24 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 160
+ - 119
+- id: 161
kind: RqOperator
span: 1:431-443
alias: total_sqrt
targets:
- - 163
- 164
- parent: 229
-- id: 163
+ - 165
+ parent: 230
+- id: 164
kind: Literal
span: 1:442-443
-- id: 164
+- id: 165
kind: RqOperator
span: 1:413-428
targets:
- - 166
-- id: 166
+ - 167
+- id: 167
kind: Ident
span: 1:423-428
ident: !Ident
@@ -275,29 +275,29 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 167
+ - 119
+- id: 168
kind: RqOperator
span: 1:489-501
alias: total_ln
targets:
- - 170
- 171
- parent: 229
-- id: 170
+ - 172
+ parent: 230
+- id: 171
kind: Literal
span: 1:500-501
-- id: 171
+- id: 172
kind: RqOperator
span: 1:478-486
targets:
- - 173
-- id: 173
+ - 174
+- id: 174
kind: RqOperator
span: 1:462-475
targets:
- - 175
-- id: 175
+ - 176
+- id: 176
kind: Ident
span: 1:470-475
ident: !Ident
@@ -305,29 +305,29 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 176
+ - 119
+- id: 177
kind: RqOperator
span: 1:550-562
alias: total_cos
targets:
- - 179
- 180
- parent: 229
-- id: 179
+ - 181
+ parent: 230
+- id: 180
kind: Literal
span: 1:561-562
-- id: 180
+- id: 181
kind: RqOperator
span: 1:538-547
targets:
- - 182
-- id: 182
+ - 183
+- id: 183
kind: RqOperator
span: 1:521-535
targets:
- - 184
-- id: 184
+ - 185
+- id: 185
kind: Ident
span: 1:530-535
ident: !Ident
@@ -335,29 +335,29 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 185
+ - 119
+- id: 186
kind: RqOperator
span: 1:611-623
alias: total_sin
targets:
- - 188
- 189
- parent: 229
-- id: 188
+ - 190
+ parent: 230
+- id: 189
kind: Literal
span: 1:622-623
-- id: 189
+- id: 190
kind: RqOperator
span: 1:599-608
targets:
- - 191
-- id: 191
+ - 192
+- id: 192
kind: RqOperator
span: 1:582-596
targets:
- - 193
-- id: 193
+ - 194
+- id: 194
kind: Ident
span: 1:591-596
ident: !Ident
@@ -365,29 +365,29 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 194
+ - 119
+- id: 195
kind: RqOperator
span: 1:672-684
alias: total_tan
targets:
- - 197
- 198
- parent: 229
-- id: 197
+ - 199
+ parent: 230
+- id: 198
kind: Literal
span: 1:683-684
-- id: 198
+- id: 199
kind: RqOperator
span: 1:660-669
targets:
- - 200
-- id: 200
+ - 201
+- id: 201
kind: RqOperator
span: 1:643-657
targets:
- - 202
-- id: 202
+ - 203
+- id: 203
kind: Ident
span: 1:652-657
ident: !Ident
@@ -395,29 +395,29 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 203
+ - 119
+- id: 204
kind: RqOperator
span: 1:742-754
alias: total_deg
targets:
- - 206
- 207
- parent: 229
-- id: 206
+ - 208
+ parent: 230
+- id: 207
kind: Literal
span: 1:753-754
-- id: 207
+- id: 208
kind: RqOperator
span: 1:727-739
targets:
- - 209
-- id: 209
+ - 210
+- id: 210
kind: RqOperator
span: 1:712-724
targets:
- - 211
-- id: 211
+ - 212
+- id: 212
kind: Ident
span: 1:704-709
ident: !Ident
@@ -425,28 +425,28 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 212
+ - 119
+- id: 213
kind: RqOperator
span: 1:798-810
alias: total_square
targets:
- - 215
- 216
- parent: 229
-- id: 215
+ - 217
+ parent: 230
+- id: 216
kind: Literal
span: 1:809-810
-- id: 216
+- id: 217
kind: RqOperator
span: 1:785-795
targets:
- - 219
- 220
-- id: 219
+ - 221
+- id: 220
kind: Literal
span: 1:794-795
-- id: 220
+- id: 221
kind: Ident
span: 1:777-782
ident: !Ident
@@ -454,28 +454,28 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 221
+ - 119
+- id: 222
kind: RqOperator
span: 1:851-863
alias: total_square_op
targets:
- - 224
- 225
- parent: 229
-- id: 224
+ - 226
+ parent: 230
+- id: 225
kind: Literal
span: 1:862-863
-- id: 225
+- id: 226
kind: RqOperator
span: 1:836-848
targets:
- - 227
- 228
-- id: 227
+ - 229
+- id: 228
kind: Literal
span: 1:846-847
-- id: 228
+- id: 229
kind: Ident
span: 1:837-842
ident: !Ident
@@ -483,32 +483,32 @@ nodes:
- invoices
- total
targets:
- - 118
-- id: 229
+ - 119
+- id: 230
kind: Tuple
span: 1:110-867
children:
- - 123
- - 128
- - 139
- - 142
- - 145
- - 152
- - 160
- - 167
- - 176
- - 185
- - 194
- - 203
- - 212
- - 221
- parent: 230
-- id: 230
+ - 124
+ - 129
+ - 140
+ - 143
+ - 146
+ - 153
+ - 161
+ - 168
+ - 177
+ - 186
+ - 195
+ - 204
+ - 213
+ - 222
+ parent: 231
+- id: 231
kind: 'TransformCall: Select'
span: 1:103-867
children:
- - 121
- - 229
+ - 122
+ - 230
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 43b1bb65bb1e..7fc19ad57182 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: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -18,10 +18,10 @@ frames:
- - 1:203-248
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -29,10 +29,10 @@ frames:
- - 1:249-262
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -40,10 +40,10 @@ frames:
- - 1:263-273
- columns:
- !All
- input_id: 127
+ input_id: 128
except: []
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
@@ -54,36 +54,36 @@ frames:
name:
- tracks
- name
- target_id: 161
+ target_id: 162
target_name: null
- !Single
name:
- tracks
- composer
- target_id: 162
+ target_id: 163
target_name: null
inputs:
- - id: 127
+ - id: 128
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 127
+- id: 128
kind: Ident
span: 1:166-177
ident: !Ident
- default_db
- tracks
- parent: 133
-- id: 129
+ parent: 134
+- id: 130
kind: RqOperator
span: 1:187-201
targets:
- - 131
- 132
- parent: 133
-- id: 131
+ - 133
+ parent: 134
+- id: 132
kind: Ident
span: 1:187-191
ident: !Ident
@@ -91,38 +91,38 @@ nodes:
- tracks
- name
targets:
- - 127
-- id: 132
+ - 128
+- id: 133
kind: Literal
span: 1:195-201
-- id: 133
+- id: 134
kind: 'TransformCall: Filter'
span: 1:179-202
children:
- - 127
- - 129
- parent: 153
-- id: 137
+ - 128
+ - 130
+ parent: 154
+- id: 138
kind: Literal
span: 1:243-244
alias: start
-- id: 138
+- id: 139
kind: Literal
span: 1:246-247
alias: end
-- id: 140
+- id: 141
kind: RqOperator
span: 1:211-237
targets:
- - 142
- - 146
-- id: 142
+ - 143
+ - 147
+- id: 143
kind: RqOperator
span: 1:212-231
targets:
- - 144
- 145
-- id: 144
+ - 146
+- id: 145
kind: Ident
span: 1:212-224
ident: !Ident
@@ -130,38 +130,38 @@ nodes:
- tracks
- milliseconds
targets:
- - 127
-- id: 145
+ - 128
+- id: 146
kind: Literal
span: 1:227-231
-- id: 146
+- id: 147
kind: Literal
span: 1:234-236
-- id: 147
+- id: 148
kind: RqOperator
span: 1:240-247
targets:
- - 149
- - 151
- parent: 153
-- id: 149
+ - 150
+ - 152
+ parent: 154
+- id: 150
kind: RqOperator
targets:
- - 140
- - 137
-- id: 151
+ - 141
+ - 138
+- id: 152
kind: RqOperator
targets:
- - 140
- - 138
-- id: 153
+ - 141
+ - 139
+- id: 154
kind: 'TransformCall: Filter'
span: 1:203-248
children:
- - 133
- - 147
- parent: 156
-- id: 154
+ - 134
+ - 148
+ parent: 157
+- id: 155
kind: Ident
span: 1:254-262
ident: !Ident
@@ -169,34 +169,34 @@ nodes:
- tracks
- track_id
targets:
- - 127
- parent: 156
-- id: 156
+ - 128
+ parent: 157
+- id: 157
kind: 'TransformCall: Sort'
span: 1:249-262
children:
- - 153
- 154
- parent: 160
-- id: 157
+ - 155
+ parent: 161
+- id: 158
kind: Literal
span: 1:268-269
alias: start
- parent: 160
-- id: 158
+ parent: 161
+- id: 159
kind: Literal
span: 1:271-273
alias: end
- parent: 160
-- id: 160
+ parent: 161
+- id: 161
kind: 'TransformCall: Take'
span: 1:263-273
children:
- - 156
- 157
- 158
- parent: 164
-- id: 161
+ - 159
+ parent: 165
+- id: 162
kind: Ident
span: 1:282-286
ident: !Ident
@@ -204,9 +204,9 @@ nodes:
- tracks
- name
targets:
- - 127
- parent: 163
-- id: 162
+ - 128
+ parent: 164
+- id: 163
kind: Ident
span: 1:288-296
ident: !Ident
@@ -214,21 +214,21 @@ nodes:
- tracks
- composer
targets:
- - 127
- parent: 163
-- id: 163
+ - 128
+ parent: 164
+- id: 164
kind: Tuple
span: 1:281-297
children:
- - 161
- 162
- parent: 164
-- id: 164
+ - 163
+ parent: 165
+- id: 165
kind: 'TransformCall: Select'
span: 1:274-297
children:
- - 160
- - 163
+ - 161
+ - 164
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 94d1c52c8768..1818ef91dc28 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
@@ -1,46 +1,83 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nsort media_type_id\n"
+expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nappend (read_json \"data_file_root/media_types.json\")\nsort media_type_id\n"
input_file: prqlc/prqlc/tests/integration/queries/read_csv.prql
---
frames:
-- - 1:92-110
+- - 1:92-144
- columns:
- !All
- input_id: 115
+ input_id: 122
except: []
inputs:
- - id: 115
- name: _literal_115
+ - id: 122
+ name: _literal_122
table:
- default_db
- - _literal_115
+ - _literal_122
+ - id: 117
+ name: _literal_117
+ table:
+ - default_db
+ - _literal_117
+- - 1:145-163
+ - columns:
+ - !All
+ input_id: 122
+ except: []
+ inputs:
+ - id: 122
+ name: _literal_122
+ table:
+ - default_db
+ - _literal_122
+ - id: 117
+ name: _literal_117
+ table:
+ - default_db
+ - _literal_117
nodes:
-- id: 115
+- id: 117
+ kind: RqOperator
+ span: 1:100-143
+ targets:
+ - 119
+ parent: 126
+- id: 119
+ kind: Literal
+ span: 1:110-143
+- id: 122
kind: RqOperator
span: 1:43-91
targets:
- - 117
- parent: 121
-- id: 117
+ - 124
+ parent: 126
+- id: 124
kind: Literal
span: 1:58-90
-- id: 119
+- id: 126
+ kind: 'TransformCall: Append'
+ span: 1:92-144
+ children:
+ - 122
+ - 117
+ parent: 129
+- id: 127
kind: Ident
- span: 1:97-110
+ span: 1:150-163
ident: !Ident
- this
- - _literal_115
+ - _literal_122
- media_type_id
targets:
- - 115
- parent: 121
-- id: 121
+ - 122
+ parent: 129
+- id: 129
kind: 'TransformCall: Sort'
- span: 1:92-110
+ span: 1:145-163
children:
- - 115
- - 119
+ - 126
+ - 127
ast:
name: Project
stmts:
@@ -67,15 +104,32 @@ ast:
span: 1:58-90
span: 1:49-90
span: 1:43-91
+ - FuncCall:
+ name:
+ Ident:
+ - append
+ span: 1:92-98
+ args:
+ - FuncCall:
+ name:
+ Ident:
+ - read_json
+ span: 1:100-109
+ args:
+ - Literal:
+ String: data_file_root/media_types.json
+ span: 1:110-143
+ span: 1:100-143
+ span: 1:92-144
- FuncCall:
name:
Ident:
- sort
- span: 1:92-96
+ span: 1:145-149
args:
- Ident:
- media_type_id
- span: 1:97-110
- span: 1:92-110
- span: 1:43-110
- span: 1:0-110
+ span: 1:150-163
+ span: 1:145-163
+ span: 1:43-163
+ span: 1:0-163
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 17906ef2f5ca..f3d84f25d35c 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: 133
+ target_id: 134
target_name: null
inputs:
- - id: 124
+ - id: 125
name: t
table:
- default_db
- - _literal_124
+ - _literal_125
- - 0:3163-3240
- columns:
- !Single
name:
- t
- a
- target_id: 133
+ target_id: 134
target_name: null
- !Single
name:
- b
- a
- target_id: 119
+ target_id: 120
target_name: a
inputs:
- - id: 124
+ - id: 125
name: t
table:
- default_db
- - _literal_124
- - id: 119
+ - _literal_125
+ - id: 120
name: b
table:
- default_db
- - _literal_119
+ - _literal_120
- - 0:3243-3288
- columns:
- !Single
name:
- t
- a
- target_id: 133
+ target_id: 134
target_name: null
- !Single
name:
- b
- a
- target_id: 119
+ target_id: 120
target_name: a
inputs:
- - id: 124
+ - id: 125
name: t
table:
- default_db
- - _literal_124
- - id: 119
+ - _literal_125
+ - id: 120
name: b
table:
- default_db
- - _literal_119
+ - _literal_120
- - 1:165-238
- columns:
- !Single
name:
- t
- a
- target_id: 204
+ target_id: 205
target_name: null
inputs:
- - id: 124
+ - id: 125
name: t
table:
- default_db
- - _literal_124
- - id: 119
+ - _literal_125
+ - id: 120
name: b
table:
- default_db
- - _literal_119
+ - _literal_120
- - 1:239-245
- columns:
- !Single
name:
- t
- a
- target_id: 204
+ target_id: 205
target_name: null
inputs:
- - id: 124
+ - id: 125
name: t
table:
- default_db
- - _literal_124
- - id: 119
+ - _literal_125
+ - id: 120
name: b
table:
- default_db
- - _literal_119
+ - _literal_120
nodes:
-- id: 119
+- id: 120
kind: Array
span: 1:173-237
- parent: 186
-- id: 124
+ parent: 187
+- id: 125
kind: Array
span: 1:36-55
- parent: 151
-- id: 133
+ parent: 152
+- id: 134
kind: Ident
ident: !Ident
- this
- t
- a
targets:
- - 124
- parent: 135
-- id: 135
+ - 125
+ parent: 136
+- id: 136
kind: Tuple
span: 1:64-69
children:
- - 133
-- id: 151
+ - 134
+- id: 152
kind: 'TransformCall: Take'
span: 1:71-77
children:
- - 124
- - 152
- parent: 186
-- id: 152
+ - 125
+ - 153
+ parent: 187
+- id: 153
kind: Literal
- parent: 151
-- id: 175
+ parent: 152
+- id: 176
kind: Ident
ident: !Ident
- this
- t
- a
targets:
- - 133
-- id: 178
+ - 134
+- id: 179
kind: Ident
ident: !Ident
- that
- b
- a
targets:
- - 119
-- id: 184
+ - 120
+- id: 185
kind: RqOperator
span: 0:3192-3239
targets:
- - 175
- - 178
- parent: 186
-- id: 186
+ - 176
+ - 179
+ parent: 187
+- id: 187
kind: 'TransformCall: Join'
span: 0:3163-3240
children:
- - 151
- - 119
- - 184
- parent: 202
-- id: 194
+ - 152
+ - 120
+ - 185
+ parent: 203
+- id: 195
kind: Ident
span: 0:5981-5989
ident: !Ident
@@ -178,47 +178,47 @@ nodes:
- b
- a
targets:
- - 119
-- id: 198
+ - 120
+- id: 199
kind: RqOperator
span: 0:3251-3287
targets:
- - 194
- - 201
- parent: 202
-- id: 201
+ - 195
+ - 202
+ parent: 203
+- id: 202
kind: Literal
span: 0:5993-5997
-- id: 202
+- id: 203
kind: 'TransformCall: Filter'
span: 0:3243-3288
children:
- - 186
- - 198
- parent: 206
-- id: 204
+ - 187
+ - 199
+ parent: 207
+- id: 205
kind: Ident
ident: !Ident
- this
- t
- a
targets:
- - 133
- parent: 205
-- id: 205
+ - 134
+ parent: 206
+- id: 206
kind: Tuple
span: 0:3298-3301
children:
- - 204
- parent: 206
-- id: 206
+ - 205
+ parent: 207
+- id: 207
kind: 'TransformCall: Select'
span: 1:165-238
children:
- - 202
- - 205
- parent: 209
-- id: 207
+ - 203
+ - 206
+ parent: 210
+- id: 208
kind: Ident
span: 1:244-245
ident: !Ident
@@ -226,14 +226,14 @@ nodes:
- t
- a
targets:
- - 204
- parent: 209
-- id: 209
+ - 205
+ parent: 210
+- id: 210
kind: 'TransformCall: Sort'
span: 1:239-245
children:
- - 206
- 207
+ - 208
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 ce1637e02847..e036a7109a1d 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: 125
+ input_id: 126
except: []
inputs:
- - id: 125
+ - id: 126
name: e
table:
- default_db
@@ -18,10 +18,10 @@ frames:
- - 1:62-90
- columns:
- !All
- input_id: 125
+ input_id: 126
except: []
inputs:
- - id: 125
+ - id: 126
name: e
table:
- default_db
@@ -29,18 +29,18 @@ frames:
- - 1:145-215
- columns:
- !All
- input_id: 125
+ input_id: 126
except: []
- !All
- input_id: 116
+ input_id: 117
except: []
inputs:
- - id: 125
+ - id: 126
name: e
table:
- default_db
- employees
- - id: 116
+ - id: 117
name: manager
table:
- default_db
@@ -49,54 +49,54 @@ frames:
- columns:
- !Single
name: null
- target_id: 141
+ target_id: 142
target_name: null
- !Single
name:
- e
- last_name
- target_id: 142
+ target_id: 143
target_name: null
- !Single
name:
- manager
- first_name
- target_id: 143
+ target_id: 144
target_name: null
inputs:
- - id: 125
+ - id: 126
name: e
table:
- default_db
- employees
- - id: 116
+ - id: 117
name: manager
table:
- default_db
- employees
nodes:
-- id: 116
+- id: 117
kind: Ident
span: 1:158-167
ident: !Ident
- default_db
- employees
- parent: 140
-- id: 125
+ parent: 141
+- id: 126
kind: Ident
span: 1:13-29
ident: !Ident
- default_db
- employees
- parent: 131
-- id: 127
+ parent: 132
+- id: 128
kind: RqOperator
span: 1:37-61
targets:
- - 129
- 130
- parent: 131
-- id: 129
+ - 131
+ parent: 132
+- id: 130
kind: Ident
span: 1:37-47
ident: !Ident
@@ -104,18 +104,18 @@ nodes:
- e
- first_name
targets:
- - 125
-- id: 130
+ - 126
+- id: 131
kind: Literal
span: 1:51-61
-- id: 131
+- id: 132
kind: 'TransformCall: Filter'
span: 1:30-61
children:
- - 125
- - 127
- parent: 135
-- id: 132
+ - 126
+ - 128
+ parent: 136
+- id: 133
kind: Ident
span: 1:68-78
ident: !Ident
@@ -123,9 +123,9 @@ nodes:
- e
- first_name
targets:
- - 125
- parent: 135
-- id: 133
+ - 126
+ parent: 136
+- id: 134
kind: Ident
span: 1:80-89
ident: !Ident
@@ -133,24 +133,24 @@ nodes:
- e
- last_name
targets:
- - 125
- parent: 135
-- id: 135
+ - 126
+ parent: 136
+- id: 136
kind: 'TransformCall: Sort'
span: 1:62-90
children:
- - 131
- 132
- 133
- parent: 140
-- id: 136
+ - 134
+ parent: 141
+- id: 137
kind: RqOperator
span: 1:179-214
targets:
- - 138
- 139
- parent: 140
-- id: 138
+ - 140
+ parent: 141
+- id: 139
kind: Ident
span: 1:179-191
ident: !Ident
@@ -158,8 +158,8 @@ nodes:
- e
- reports_to
targets:
- - 125
-- id: 139
+ - 126
+- id: 140
kind: Ident
span: 1:195-214
ident: !Ident
@@ -167,16 +167,16 @@ nodes:
- manager
- employee_id
targets:
- - 116
-- id: 140
+ - 117
+- id: 141
kind: 'TransformCall: Join'
span: 1:145-215
children:
- - 135
- - 116
- 136
- parent: 145
-- id: 141
+ - 117
+ - 137
+ parent: 146
+- id: 142
kind: Ident
span: 1:225-237
ident: !Ident
@@ -184,9 +184,9 @@ nodes:
- e
- first_name
targets:
- - 125
- parent: 144
-- id: 142
+ - 126
+ parent: 145
+- id: 143
kind: Ident
span: 1:239-250
ident: !Ident
@@ -194,9 +194,9 @@ nodes:
- e
- last_name
targets:
- - 125
- parent: 144
-- id: 143
+ - 126
+ parent: 145
+- id: 144
kind: Ident
span: 1:252-270
ident: !Ident
@@ -204,22 +204,22 @@ nodes:
- manager
- first_name
targets:
- - 116
- parent: 144
-- id: 144
+ - 117
+ parent: 145
+- id: 145
kind: Tuple
span: 1:224-271
children:
- - 141
- 142
- 143
- parent: 145
-- id: 145
+ - 144
+ parent: 146
+- id: 146
kind: 'TransformCall: Select'
span: 1:217-271
children:
- - 140
- - 144
+ - 141
+ - 145
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 d97ccfa4ab54..88d00fc5bff1 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: 127
+ target_id: 128
target_name: null
- !Single
name:
- albums
- artist_id
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 125
+ - id: 126
name: albums
table:
- default_db
@@ -28,16 +28,16 @@ frames:
- !Single
name:
- AA
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- albums
- artist_id
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 125
+ - id: 126
name: albums
table:
- default_db
@@ -47,16 +47,16 @@ frames:
- !Single
name:
- AA
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- albums
- artist_id
- target_id: 128
+ target_id: 129
target_name: null
inputs:
- - id: 125
+ - id: 126
name: albums
table:
- default_db
@@ -66,44 +66,44 @@ frames:
- !Single
name:
- AA
- target_id: 127
+ target_id: 128
target_name: null
- !Single
name:
- albums
- artist_id
- target_id: 128
+ target_id: 129
target_name: null
- !All
- input_id: 113
+ input_id: 114
except: []
inputs:
- - id: 125
+ - id: 126
name: albums
table:
- default_db
- albums
- - id: 113
+ - id: 114
name: artists
table:
- default_db
- artists
nodes:
-- id: 113
+- id: 114
kind: Ident
span: 1:75-82
ident: !Ident
- default_db
- artists
- parent: 143
-- id: 125
+ parent: 144
+- id: 126
kind: Ident
span: 1:0-11
ident: !Ident
- default_db
- albums
- parent: 130
-- id: 127
+ parent: 131
+- id: 128
kind: Ident
span: 1:24-32
alias: AA
@@ -112,9 +112,9 @@ nodes:
- albums
- album_id
targets:
- - 125
- parent: 129
-- id: 128
+ - 126
+ parent: 130
+- id: 129
kind: Ident
span: 1:34-43
ident: !Ident
@@ -122,71 +122,71 @@ nodes:
- albums
- artist_id
targets:
- - 125
- parent: 129
-- id: 129
+ - 126
+ parent: 130
+- id: 130
kind: Tuple
span: 1:19-45
children:
- - 127
- 128
- parent: 130
-- id: 130
+ - 129
+ parent: 131
+- id: 131
kind: 'TransformCall: Select'
span: 1:12-45
children:
- - 125
- - 129
- parent: 133
-- id: 131
+ - 126
+ - 130
+ parent: 134
+- id: 132
kind: Ident
span: 1:51-53
ident: !Ident
- this
- AA
targets:
- - 127
- parent: 133
-- id: 133
+ - 128
+ parent: 134
+- id: 134
kind: 'TransformCall: Sort'
span: 1:46-53
children:
- - 130
- 131
- parent: 138
-- id: 134
+ - 132
+ parent: 139
+- id: 135
kind: RqOperator
span: 1:61-69
targets:
- - 136
- 137
- parent: 138
-- id: 136
+ - 138
+ parent: 139
+- id: 137
kind: Ident
span: 1:61-63
ident: !Ident
- this
- AA
targets:
- - 127
-- id: 137
+ - 128
+- id: 138
kind: Literal
span: 1:67-69
-- id: 138
+- id: 139
kind: 'TransformCall: Filter'
span: 1:54-69
children:
- - 133
- 134
- parent: 143
-- id: 139
+ - 135
+ parent: 144
+- id: 140
kind: RqOperator
span: 1:84-95
targets:
- - 141
- 142
- parent: 143
-- id: 141
+ - 143
+ parent: 144
+- id: 142
kind: Ident
span: 1:86-95
ident: !Ident
@@ -194,8 +194,8 @@ nodes:
- albums
- artist_id
targets:
- - 128
-- id: 142
+ - 129
+- id: 143
kind: Ident
span: 1:86-95
ident: !Ident
@@ -203,14 +203,14 @@ nodes:
- artists
- artist_id
targets:
- - 113
-- id: 143
+ - 114
+- id: 144
kind: 'TransformCall: Join'
span: 1:70-96
children:
- - 138
- - 113
- 139
+ - 114
+ - 140
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 cd04465b34b7..6ff5a13d8454 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: 147
+ target_id: 148
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- album_id
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
+ - _literal_142
- - 1:87-94
- columns:
- !Single
name:
- AA
- target_id: 147
+ target_id: 148
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- album_id
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 149
+ target_id: 150
target_name: null
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
+ - _literal_142
- - 1:95-158
- columns:
- !Single
name:
- AA
- target_id: 147
+ target_id: 148
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- album_id
- target_id: 148
+ target_id: 149
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 149
+ target_id: 150
target_name: null
- !Single
name:
- - _literal_129
+ - _literal_130
- album_id
- target_id: 129
+ target_id: 130
target_name: album_id
- !Single
name:
- - _literal_129
+ - _literal_130
- album_title
- target_id: 129
+ target_id: 130
target_name: album_title
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
- - id: 129
- name: _literal_129
+ - _literal_142
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:159-213
- columns:
- !Single
name:
- AA
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name:
- AT
- target_id: 161
+ target_id: 162
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 165
+ target_id: 166
target_name: null
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
- - id: 129
- name: _literal_129
+ - _literal_142
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:214-228
- columns:
- !Single
name:
- AA
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name:
- AT
- target_id: 161
+ target_id: 162
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 165
+ target_id: 166
target_name: null
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
- - id: 129
- name: _literal_129
+ - _literal_142
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
+ - _literal_130
- - 1:229-291
- columns:
- !Single
name:
- AA
- target_id: 160
+ target_id: 161
target_name: null
- !Single
name:
- AT
- target_id: 161
+ target_id: 162
target_name: null
- !Single
name:
- - _literal_141
+ - _literal_142
- genre_id
- target_id: 165
+ target_id: 166
target_name: null
- !Single
name:
- - _literal_116
+ - _literal_117
- genre_id
- target_id: 116
+ target_id: 117
target_name: genre_id
- !Single
name:
- - _literal_116
+ - _literal_117
- genre_title
- target_id: 116
+ target_id: 117
target_name: genre_title
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
- - id: 129
- name: _literal_129
+ - _literal_142
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
- - id: 116
- name: _literal_116
+ - _literal_130
+ - id: 117
+ name: _literal_117
table:
- default_db
- - _literal_116
+ - _literal_117
- - 1:292-340
- columns:
- !Single
name:
- AA
- target_id: 178
+ target_id: 179
target_name: null
- !Single
name:
- AT
- target_id: 179
+ target_id: 180
target_name: null
- !Single
name:
- GT
- target_id: 180
+ target_id: 181
target_name: null
inputs:
- - id: 141
- name: _literal_141
+ - id: 142
+ name: _literal_142
table:
- default_db
- - _literal_141
- - id: 129
- name: _literal_129
+ - _literal_142
+ - id: 130
+ name: _literal_130
table:
- default_db
- - _literal_129
- - id: 116
- name: _literal_116
+ - _literal_130
+ - id: 117
+ name: _literal_117
table:
- default_db
- - _literal_116
+ - _literal_117
nodes:
-- id: 116
+- id: 117
kind: Array
span: 1:244-278
children:
- - 117
- parent: 177
-- id: 117
+ - 118
+ parent: 178
+- id: 118
kind: Tuple
span: 1:245-277
children:
- - 118
- 119
- parent: 116
-- id: 118
+ - 120
+ parent: 117
+- id: 119
kind: Literal
span: 1:255-256
alias: genre_id
- parent: 117
-- id: 119
+ parent: 118
+- id: 120
kind: Literal
span: 1:270-276
alias: genre_title
- parent: 117
-- id: 129
+ parent: 118
+- id: 130
kind: Array
span: 1:110-145
children:
- - 130
- parent: 159
-- id: 130
+ - 131
+ parent: 160
+- id: 131
kind: Tuple
span: 1:111-144
children:
- - 131
- 132
- parent: 129
-- id: 131
+ - 133
+ parent: 130
+- id: 132
kind: Literal
span: 1:121-122
alias: album_id
- parent: 130
-- id: 132
+ parent: 131
+- id: 133
kind: Literal
span: 1:136-143
alias: album_title
- parent: 130
-- id: 141
+ parent: 131
+- id: 142
kind: Array
span: 1:0-43
children:
- - 142
- parent: 151
-- id: 142
+ - 143
+ parent: 152
+- id: 143
kind: Tuple
span: 1:6-42
children:
- - 143
- 144
- 145
- parent: 141
-- id: 143
+ - 146
+ parent: 142
+- id: 144
kind: Literal
span: 1:16-17
alias: track_id
- parent: 142
-- id: 144
+ parent: 143
+- id: 145
kind: Literal
span: 1:28-29
alias: album_id
- parent: 142
-- id: 145
+ parent: 143
+- id: 146
kind: Literal
span: 1:40-41
alias: genre_id
- parent: 142
-- id: 147
+ parent: 143
+- id: 148
kind: Ident
span: 1:56-64
alias: AA
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- track_id
targets:
- - 141
- parent: 150
-- id: 148
+ - 142
+ parent: 151
+- id: 149
kind: Ident
span: 1:66-74
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- album_id
targets:
- - 141
- parent: 150
-- id: 149
+ - 142
+ parent: 151
+- id: 150
kind: Ident
span: 1:76-84
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- genre_id
targets:
- - 141
- parent: 150
-- id: 150
+ - 142
+ parent: 151
+- id: 151
kind: Tuple
span: 1:51-86
children:
- - 147
- 148
- 149
- parent: 151
-- id: 151
+ - 150
+ parent: 152
+- id: 152
kind: 'TransformCall: Select'
span: 1:44-86
children:
- - 141
- - 150
- parent: 154
-- id: 152
+ - 142
+ - 151
+ parent: 155
+- id: 153
kind: Ident
span: 1:92-94
ident: !Ident
- this
- AA
targets:
- - 147
- parent: 154
-- id: 154
+ - 148
+ parent: 155
+- id: 155
kind: 'TransformCall: Sort'
span: 1:87-94
children:
- - 151
- 152
- parent: 159
-- id: 155
+ - 153
+ parent: 160
+- id: 156
kind: RqOperator
span: 1:147-157
targets:
- - 157
- 158
- parent: 159
-- id: 157
+ - 159
+ parent: 160
+- id: 158
kind: Ident
span: 1:149-157
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- album_id
targets:
- - 148
-- id: 158
+ - 149
+- id: 159
kind: Ident
span: 1:149-157
ident: !Ident
- that
- - _literal_129
+ - _literal_130
- album_id
targets:
- - 129
-- id: 159
+ - 130
+- id: 160
kind: 'TransformCall: Join'
span: 1:95-158
children:
- - 154
- - 129
- 155
- parent: 167
-- id: 160
+ - 130
+ - 156
+ parent: 168
+- id: 161
kind: Ident
span: 1:168-170
ident: !Ident
- this
- AA
targets:
- - 147
- parent: 166
-- id: 161
+ - 148
+ parent: 167
+- id: 162
kind: RqOperator
span: 1:177-201
alias: AT
targets:
- - 163
- 164
- parent: 166
-- id: 163
+ - 165
+ parent: 167
+- id: 164
kind: Ident
span: 1:177-188
ident: !Ident
- this
- - _literal_129
+ - _literal_130
- album_title
targets:
- - 129
-- id: 164
+ - 130
+- id: 165
kind: Literal
span: 1:192-201
-- id: 165
+- id: 166
kind: Ident
span: 1:203-211
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- genre_id
targets:
- - 149
- parent: 166
-- id: 166
+ - 150
+ parent: 167
+- id: 167
kind: Tuple
span: 1:166-213
children:
- - 160
- 161
- - 165
- parent: 167
-- id: 167
+ - 162
+ - 166
+ parent: 168
+- id: 168
kind: 'TransformCall: Select'
span: 1:159-213
children:
- - 159
- - 166
- parent: 172
-- id: 168
+ - 160
+ - 167
+ parent: 173
+- id: 169
kind: RqOperator
span: 1:221-228
targets:
- - 170
- 171
- parent: 172
-- id: 170
+ - 172
+ parent: 173
+- id: 171
kind: Ident
span: 1:221-223
ident: !Ident
- this
- AA
targets:
- - 160
-- id: 171
+ - 161
+- id: 172
kind: Literal
span: 1:226-228
-- id: 172
+- id: 173
kind: 'TransformCall: Filter'
span: 1:214-228
children:
- - 167
- 168
- parent: 177
-- id: 173
+ - 169
+ parent: 178
+- id: 174
kind: RqOperator
span: 1:280-290
targets:
- - 175
- 176
- parent: 177
-- id: 175
+ - 177
+ parent: 178
+- id: 176
kind: Ident
span: 1:282-290
ident: !Ident
- this
- - _literal_141
+ - _literal_142
- genre_id
targets:
- - 165
-- id: 176
+ - 166
+- id: 177
kind: Ident
span: 1:282-290
ident: !Ident
- that
- - _literal_116
+ - _literal_117
- genre_id
targets:
- - 116
-- id: 177
+ - 117
+- id: 178
kind: 'TransformCall: Join'
span: 1:229-291
children:
- - 172
- - 116
- 173
- parent: 185
-- id: 178
+ - 117
+ - 174
+ parent: 186
+- id: 179
kind: Ident
span: 1:301-303
ident: !Ident
- this
- AA
targets:
- - 160
- parent: 184
-- id: 179
+ - 161
+ parent: 185
+- id: 180
kind: Ident
span: 1:305-307
ident: !Ident
- this
- AT
targets:
- - 161
- parent: 184
-- id: 180
+ - 162
+ parent: 185
+- id: 181
kind: RqOperator
span: 1:314-338
alias: GT
targets:
- - 182
- 183
- parent: 184
-- id: 182
+ - 184
+ parent: 185
+- id: 183
kind: Ident
span: 1:314-325
ident: !Ident
- this
- - _literal_116
+ - _literal_117
- genre_title
targets:
- - 116
-- id: 183
+ - 117
+- id: 184
kind: Literal
span: 1:329-338
-- id: 184
+- id: 185
kind: Tuple
span: 1:299-340
children:
- - 178
- 179
- 180
- parent: 185
-- id: 185
+ - 181
+ parent: 186
+- id: 186
kind: 'TransformCall: Select'
span: 1:292-340
children:
- - 177
- - 184
+ - 178
+ - 185
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 214cadff2d44..2c09ec1d95dc 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: 121
+ input_id: 122
except: []
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -20,10 +20,10 @@ frames:
- !Single
name:
- display
- target_id: 126
+ target_id: 127
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
@@ -33,23 +33,23 @@ frames:
- !Single
name:
- display
- target_id: 126
+ target_id: 127
target_name: null
inputs:
- - id: 121
+ - id: 122
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:89-100
ident: !Ident
- default_db
- tracks
- parent: 125
-- id: 123
+ parent: 126
+- id: 124
kind: Ident
span: 1:106-118
ident: !Ident
@@ -57,34 +57,34 @@ nodes:
- tracks
- milliseconds
targets:
- - 121
- parent: 125
-- id: 125
+ - 122
+ parent: 126
+- id: 126
kind: 'TransformCall: Sort'
span: 1:101-118
children:
- - 121
- - 123
- parent: 140
-- id: 126
+ - 122
+ - 124
+ parent: 141
+- id: 127
kind: Case
span: 1:136-246
alias: display
targets:
- - 127
- - 131
+ - 128
- 132
- - 136
+ - 133
- 137
- 138
- parent: 139
-- id: 127
+ - 139
+ parent: 140
+- id: 128
kind: RqOperator
span: 1:147-163
targets:
- - 129
- 130
-- id: 129
+ - 131
+- id: 130
kind: Ident
span: 1:147-155
ident: !Ident
@@ -92,11 +92,11 @@ nodes:
- tracks
- composer
targets:
- - 121
-- id: 130
+ - 122
+- id: 131
kind: Literal
span: 1:159-163
-- id: 131
+- id: 132
kind: Ident
span: 1:167-175
ident: !Ident
@@ -104,14 +104,14 @@ nodes:
- tracks
- composer
targets:
- - 121
-- id: 132
+ - 122
+- id: 133
kind: RqOperator
span: 1:181-194
targets:
- - 134
- 135
-- id: 134
+ - 136
+- id: 135
kind: Ident
span: 1:181-189
ident: !Ident
@@ -119,41 +119,41 @@ nodes:
- tracks
- genre_id
targets:
- - 121
-- id: 135
+ - 122
+- id: 136
kind: Literal
span: 1:192-194
-- id: 136
+- id: 137
kind: Literal
span: 1:198-211
-- id: 137
+- id: 138
kind: Literal
span: 1:217-221
-- id: 138
+- id: 139
kind: FString
span: 1:225-244
-- id: 139
+- id: 140
kind: Tuple
span: 1:136-246
children:
- - 126
- parent: 140
-- id: 140
+ - 127
+ parent: 141
+- id: 141
kind: 'TransformCall: Select'
span: 1:119-246
children:
- - 125
- - 139
- parent: 142
-- id: 142
+ - 126
+ - 140
+ parent: 143
+- id: 143
kind: 'TransformCall: Take'
span: 1:247-254
children:
- - 140
- - 143
-- id: 143
+ - 141
+ - 144
+- id: 144
kind: Literal
- parent: 142
+ parent: 143
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 3278db2a295b..24281fa76fa4 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: 118
+ input_id: 119
except: []
inputs:
- - id: 118
+ - id: 119
name: tracks
table:
- default_db
@@ -18,23 +18,23 @@ frames:
- - 1:42-51
- columns:
- !All
- input_id: 118
+ input_id: 119
except: []
inputs:
- - id: 118
+ - id: 119
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 118
+- id: 119
kind: Ident
span: 1:13-24
ident: !Ident
- default_db
- tracks
- parent: 122
-- id: 120
+ parent: 123
+- id: 121
kind: Ident
span: 1:31-40
ident: !Ident
@@ -42,32 +42,32 @@ nodes:
- tracks
- track_id
targets:
- - 118
- parent: 122
-- id: 122
+ - 119
+ parent: 123
+- id: 123
kind: 'TransformCall: Sort'
span: 1:25-41
children:
- - 118
- - 120
- parent: 126
-- id: 123
+ - 119
+ - 121
+ parent: 127
+- id: 124
kind: Literal
span: 1:47-48
alias: start
- parent: 126
-- id: 124
+ parent: 127
+- id: 125
kind: Literal
span: 1:50-51
alias: end
- parent: 126
-- id: 126
+ parent: 127
+- id: 127
kind: 'TransformCall: Take'
span: 1:42-51
children:
- - 122
- 123
- 124
+ - 125
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 7820586008c4..6b34a409e504 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: 123
+ target_id: 124
target_name: null
- !Single
name:
- title_and_spaces
- target_id: 124
+ target_id: 125
target_name: null
- !Single
name:
- low
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- up
- target_id: 129
+ target_id: 130
target_name: null
- !Single
name:
- ltrimmed
- target_id: 132
+ target_id: 133
target_name: null
- !Single
name:
- rtrimmed
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- trimmed
- target_id: 138
+ target_id: 139
target_name: null
- !Single
name:
- len
- target_id: 141
+ target_id: 142
target_name: null
- !Single
name:
- subs
- target_id: 144
+ target_id: 145
target_name: null
- !Single
name:
- replace
- target_id: 150
+ target_id: 151
target_name: null
inputs:
- - id: 121
+ - id: 122
name: albums
table:
- default_db
@@ -69,55 +69,55 @@ frames:
name:
- albums
- title
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- title_and_spaces
- target_id: 124
+ target_id: 125
target_name: null
- !Single
name:
- low
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- up
- target_id: 129
+ target_id: 130
target_name: null
- !Single
name:
- ltrimmed
- target_id: 132
+ target_id: 133
target_name: null
- !Single
name:
- rtrimmed
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- trimmed
- target_id: 138
+ target_id: 139
target_name: null
- !Single
name:
- len
- target_id: 141
+ target_id: 142
target_name: null
- !Single
name:
- subs
- target_id: 144
+ target_id: 145
target_name: null
- !Single
name:
- replace
- target_id: 150
+ target_id: 151
target_name: null
inputs:
- - id: 121
+ - id: 122
name: albums
table:
- default_db
@@ -128,68 +128,68 @@ frames:
name:
- albums
- title
- target_id: 123
+ target_id: 124
target_name: null
- !Single
name:
- title_and_spaces
- target_id: 124
+ target_id: 125
target_name: null
- !Single
name:
- low
- target_id: 126
+ target_id: 127
target_name: null
- !Single
name:
- up
- target_id: 129
+ target_id: 130
target_name: null
- !Single
name:
- ltrimmed
- target_id: 132
+ target_id: 133
target_name: null
- !Single
name:
- rtrimmed
- target_id: 135
+ target_id: 136
target_name: null
- !Single
name:
- trimmed
- target_id: 138
+ target_id: 139
target_name: null
- !Single
name:
- len
- target_id: 141
+ target_id: 142
target_name: null
- !Single
name:
- subs
- target_id: 144
+ target_id: 145
target_name: null
- !Single
name:
- replace
- target_id: 150
+ target_id: 151
target_name: null
inputs:
- - id: 121
+ - id: 122
name: albums
table:
- default_db
- albums
nodes:
-- id: 121
+- id: 122
kind: Ident
span: 1:115-126
ident: !Ident
- default_db
- albums
- parent: 157
-- id: 123
+ parent: 158
+- id: 124
kind: Ident
span: 1:140-145
ident: !Ident
@@ -197,16 +197,16 @@ nodes:
- albums
- title
targets:
- - 121
- parent: 156
-- id: 124
+ - 122
+ parent: 157
+- id: 125
kind: FString
span: 1:170-184
alias: title_and_spaces
targets:
- - 125
- parent: 156
-- id: 125
+ - 126
+ parent: 157
+- id: 126
kind: Ident
span: 1:175-180
ident: !Ident
@@ -214,15 +214,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 126
+ - 122
+- id: 127
kind: RqOperator
span: 1:205-215
alias: low
targets:
- - 128
- parent: 156
-- id: 128
+ - 129
+ parent: 157
+- id: 129
kind: Ident
span: 1:197-202
ident: !Ident
@@ -230,15 +230,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 129
+ - 122
+- id: 130
kind: RqOperator
span: 1:236-246
alias: up
targets:
- - 131
- parent: 156
-- id: 131
+ - 132
+ parent: 157
+- id: 132
kind: Ident
span: 1:228-233
ident: !Ident
@@ -246,15 +246,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 132
+ - 122
+- id: 133
kind: RqOperator
span: 1:273-283
alias: ltrimmed
targets:
- - 134
- parent: 156
-- id: 134
+ - 135
+ parent: 157
+- id: 135
kind: Ident
span: 1:265-270
ident: !Ident
@@ -262,15 +262,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 135
+ - 122
+- id: 136
kind: RqOperator
span: 1:310-320
alias: rtrimmed
targets:
- - 137
- parent: 156
-- id: 137
+ - 138
+ parent: 157
+- id: 138
kind: Ident
span: 1:302-307
ident: !Ident
@@ -278,15 +278,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 138
+ - 122
+- id: 139
kind: RqOperator
span: 1:346-355
alias: trimmed
targets:
- - 140
- parent: 156
-- id: 140
+ - 141
+ parent: 157
+- id: 141
kind: Ident
span: 1:338-343
ident: !Ident
@@ -294,15 +294,15 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 141
+ - 122
+- id: 142
kind: RqOperator
span: 1:377-388
alias: len
targets:
- - 143
- parent: 156
-- id: 143
+ - 144
+ parent: 157
+- id: 144
kind: Ident
span: 1:369-374
ident: !Ident
@@ -310,23 +310,23 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 144
+ - 122
+- id: 145
kind: RqOperator
span: 1:411-427
alias: subs
targets:
- - 147
- 148
- 149
- parent: 156
-- id: 147
+ - 150
+ parent: 157
+- id: 148
kind: Literal
span: 1:424-425
-- id: 148
+- id: 149
kind: Literal
span: 1:426-427
-- id: 149
+- id: 150
kind: Ident
span: 1:403-408
ident: !Ident
@@ -334,23 +334,23 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 150
+ - 122
+- id: 151
kind: RqOperator
span: 1:453-477
alias: replace
targets:
- - 153
- 154
- 155
- parent: 156
-- id: 153
+ - 156
+ parent: 157
+- id: 154
kind: Literal
span: 1:466-470
-- id: 154
+- id: 155
kind: Literal
span: 1:471-477
-- id: 155
+- id: 156
kind: Ident
span: 1:445-450
ident: !Ident
@@ -358,30 +358,30 @@ nodes:
- albums
- title
targets:
- - 121
-- id: 156
+ - 122
+- id: 157
kind: Tuple
span: 1:134-481
children:
- - 123
- 124
- - 126
- - 129
- - 132
- - 135
- - 138
- - 141
- - 144
- - 150
- parent: 157
-- id: 157
+ - 125
+ - 127
+ - 130
+ - 133
+ - 136
+ - 139
+ - 142
+ - 145
+ - 151
+ parent: 158
+- id: 158
kind: 'TransformCall: Select'
span: 1:127-481
children:
- - 121
- - 156
- parent: 160
-- id: 158
+ - 122
+ - 157
+ parent: 161
+- id: 159
kind: Ident
span: 1:488-493
ident: !Ident
@@ -389,38 +389,38 @@ nodes:
- albums
- title
targets:
- - 123
- parent: 160
-- id: 160
+ - 124
+ parent: 161
+- id: 161
kind: 'TransformCall: Sort'
span: 1:482-494
children:
- - 157
- 158
- parent: 180
-- id: 161
+ - 159
+ parent: 181
+- id: 162
kind: RqOperator
span: 1:502-606
targets:
- - 163
- - 175
- parent: 180
-- id: 163
+ - 164
+ - 176
+ parent: 181
+- id: 164
kind: RqOperator
span: 1:502-573
targets:
- - 165
- - 170
-- id: 165
+ - 166
+ - 171
+- id: 166
kind: RqOperator
span: 1:511-535
targets:
- - 168
- 169
-- id: 168
+ - 170
+- id: 169
kind: Literal
span: 1:528-535
-- id: 169
+- id: 170
kind: Ident
span: 1:503-508
ident: !Ident
@@ -428,17 +428,17 @@ nodes:
- albums
- title
targets:
- - 123
-- id: 170
+ - 124
+- id: 171
kind: RqOperator
span: 1:549-572
targets:
- - 173
- 174
-- id: 173
+ - 175
+- id: 174
kind: Literal
span: 1:563-572
-- id: 174
+- id: 175
kind: Ident
span: 1:541-546
ident: !Ident
@@ -446,17 +446,17 @@ nodes:
- albums
- title
targets:
- - 123
-- id: 175
+ - 124
+- id: 176
kind: RqOperator
span: 1:586-605
targets:
- - 178
- 179
-- id: 178
+ - 180
+- id: 179
kind: Literal
span: 1:601-605
-- id: 179
+- id: 180
kind: Ident
span: 1:578-583
ident: !Ident
@@ -464,13 +464,13 @@ nodes:
- albums
- title
targets:
- - 123
-- id: 180
+ - 124
+- id: 181
kind: 'TransformCall: Filter'
span: 1:495-606
children:
- - 160
- 161
+ - 162
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 a90d4d74ee3a..7ebcfbaade44 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: 124
+ input_id: 125
except:
- genre_id
- !Single
name:
- num
- target_id: 162
+ target_id: 163
target_name: null
- !Single
name:
- total
- target_id: 170
+ target_id: 171
target_name: null
- !Single
name:
- last_val
- target_id: 172
+ target_id: 173
target_name: null
inputs:
- - id: 124
+ - id: 125
name: tracks
table:
- default_db
@@ -37,29 +37,29 @@ frames:
name:
- tracks
- genre_id
- target_id: 126
+ target_id: 127
target_name: null
- !All
- input_id: 124
+ input_id: 125
except:
- genre_id
- !Single
name:
- num
- target_id: 162
+ target_id: 163
target_name: null
- !Single
name:
- total
- target_id: 170
+ target_id: 171
target_name: null
- !Single
name:
- last_val
- target_id: 172
+ target_id: 173
target_name: null
inputs:
- - id: 124
+ - id: 125
name: tracks
table:
- default_db
@@ -70,29 +70,29 @@ frames:
name:
- tracks
- genre_id
- target_id: 126
+ target_id: 127
target_name: null
- !All
- input_id: 124
+ input_id: 125
except:
- genre_id
- !Single
name:
- num
- target_id: 162
+ target_id: 163
target_name: null
- !Single
name:
- total
- target_id: 170
+ target_id: 171
target_name: null
- !Single
name:
- last_val
- target_id: 172
+ target_id: 173
target_name: null
inputs:
- - id: 124
+ - id: 125
name: tracks
table:
- default_db
@@ -103,31 +103,31 @@ frames:
name:
- tracks
- track_id
- target_id: 186
+ target_id: 187
target_name: null
- !Single
name:
- tracks
- genre_id
- target_id: 187
+ target_id: 188
target_name: null
- !Single
name:
- num
- target_id: 188
+ target_id: 189
target_name: null
- !Single
name:
- total
- target_id: 189
+ target_id: 190
target_name: null
- !Single
name:
- last_val
- target_id: 190
+ target_id: 191
target_name: null
inputs:
- - id: 124
+ - id: 125
name: tracks
table:
- default_db
@@ -138,44 +138,44 @@ frames:
name:
- tracks
- track_id
- target_id: 186
+ target_id: 187
target_name: null
- !Single
name:
- tracks
- genre_id
- target_id: 187
+ target_id: 188
target_name: null
- !Single
name:
- num
- target_id: 188
+ target_id: 189
target_name: null
- !Single
name:
- total
- target_id: 189
+ target_id: 190
target_name: null
- !Single
name:
- last_val
- target_id: 190
+ target_id: 191
target_name: null
inputs:
- - id: 124
+ - id: 125
name: tracks
table:
- default_db
- tracks
nodes:
-- id: 124
+- id: 125
kind: Ident
span: 1:470-481
ident: !Ident
- default_db
- tracks
- parent: 176
-- id: 126
+ parent: 177
+- id: 127
kind: Ident
span: 1:488-496
ident: !Ident
@@ -183,14 +183,14 @@ nodes:
- tracks
- genre_id
targets:
- - 124
- parent: 135
-- id: 135
+ - 125
+ parent: 136
+- id: 136
kind: Tuple
span: 1:488-496
children:
- - 126
-- id: 154
+ - 127
+- id: 155
kind: Ident
span: 1:506-518
ident: !Ident
@@ -198,33 +198,33 @@ nodes:
- tracks
- milliseconds
targets:
- - 124
-- id: 162
+ - 125
+- id: 163
kind: RqOperator
span: 1:540-555
alias: num
targets:
- - 163
- parent: 175
-- id: 163
+ - 164
+ parent: 176
+- id: 164
kind: Literal
-- id: 170
+- id: 171
kind: RqOperator
span: 1:569-579
alias: total
targets:
- - 171
- parent: 175
-- id: 171
- kind: Literal
+ - 172
+ parent: 176
- id: 172
+ kind: Literal
+- id: 173
kind: RqOperator
span: 1:596-609
alias: last_val
targets:
- - 174
- parent: 175
-- id: 174
+ - 175
+ parent: 176
+- id: 175
kind: Ident
span: 1:601-609
ident: !Ident
@@ -232,33 +232,33 @@ nodes:
- tracks
- track_id
targets:
- - 124
-- id: 175
+ - 125
+- id: 176
kind: Tuple
span: 1:528-614
children:
- - 162
- - 170
- - 172
- parent: 176
-- id: 176
+ - 163
+ - 171
+ - 173
+ parent: 177
+- id: 177
kind: 'TransformCall: Derive'
span: 1:521-614
children:
- - 124
- - 175
- parent: 178
-- id: 178
+ - 125
+ - 176
+ parent: 179
+- id: 179
kind: 'TransformCall: Take'
span: 1:617-624
children:
- - 176
- - 179
- parent: 185
-- id: 179
+ - 177
+ - 180
+ parent: 186
+- id: 180
kind: Literal
- parent: 178
-- id: 182
+ parent: 179
+- id: 183
kind: Ident
span: 1:633-641
ident: !Ident
@@ -266,9 +266,9 @@ nodes:
- tracks
- genre_id
targets:
- - 126
- parent: 185
-- id: 183
+ - 127
+ parent: 186
+- id: 184
kind: Ident
span: 1:643-655
ident: !Ident
@@ -276,17 +276,17 @@ nodes:
- tracks
- milliseconds
targets:
- - 124
- parent: 185
-- id: 185
+ - 125
+ parent: 186
+- id: 186
kind: 'TransformCall: Sort'
span: 1:627-656
children:
- - 178
- - 182
+ - 179
- 183
- parent: 192
-- id: 186
+ - 184
+ parent: 193
+- id: 187
kind: Ident
span: 1:665-673
ident: !Ident
@@ -294,9 +294,9 @@ nodes:
- tracks
- track_id
targets:
- - 124
- parent: 191
-- id: 187
+ - 125
+ parent: 192
+- id: 188
kind: Ident
span: 1:675-683
ident: !Ident
@@ -304,60 +304,60 @@ nodes:
- tracks
- genre_id
targets:
- - 126
- parent: 191
-- id: 188
+ - 127
+ parent: 192
+- id: 189
kind: Ident
span: 1:685-688
ident: !Ident
- this
- num
targets:
- - 162
- parent: 191
-- id: 189
+ - 163
+ parent: 192
+- id: 190
kind: Ident
span: 1:690-695
ident: !Ident
- this
- total
targets:
- - 170
- parent: 191
-- id: 190
+ - 171
+ parent: 192
+- id: 191
kind: Ident
span: 1:697-705
ident: !Ident
- this
- last_val
targets:
- - 172
- parent: 191
-- id: 191
+ - 173
+ parent: 192
+- id: 192
kind: Tuple
span: 1:664-706
children:
- - 186
- 187
- 188
- 189
- 190
- parent: 192
-- id: 192
+ - 191
+ parent: 193
+- id: 193
kind: 'TransformCall: Select'
span: 1:657-706
children:
- - 185
- - 191
- parent: 197
-- id: 193
+ - 186
+ - 192
+ parent: 198
+- id: 194
kind: RqOperator
span: 1:714-728
targets:
- - 195
- 196
- parent: 197
-- id: 195
+ - 197
+ parent: 198
+- id: 196
kind: Ident
span: 1:714-722
ident: !Ident
@@ -365,16 +365,16 @@ nodes:
- tracks
- genre_id
targets:
- - 187
-- id: 196
+ - 188
+- id: 197
kind: Literal
span: 1:726-728
-- id: 197
+- id: 198
kind: 'TransformCall: Filter'
span: 1:707-728
children:
- - 192
- 193
+ - 194
ast:
name: Project
stmts:
diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__read_csv.snap
index 3573846f539a..57ef8d87ac66 100644
--- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__read_csv.snap
+++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__read_csv.snap
@@ -1,7 +1,10 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nsort media_type_id\n"
+expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nappend (read_json \"data_file_root/media_types.json\")\nsort media_type_id\n"
input_file: prqlc/prqlc/tests/integration/queries/read_csv.prql
---
from (read_csv "data_file_root/media_types.csv")
+append (
+ read_json "data_file_root/media_types.json"
+)
sort media_type_id
diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__lex__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__lex__read_csv.snap
index c7f8a18b32be..c86e00df1b44 100644
--- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__lex__read_csv.snap
+++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__lex__read_csv.snap
@@ -18,8 +18,14 @@ Tokens(
58..90: Literal(String("data_file_root/media_types.csv")),
90..91: Control(')'),
91..92: NewLine,
- 92..96: Ident("sort"),
- 97..110: Ident("media_type_id"),
- 110..111: NewLine,
+ 92..98: Ident("append"),
+ 99..100: Control('('),
+ 100..109: Ident("read_json"),
+ 110..143: Literal(String("data_file_root/media_types.json")),
+ 143..144: Control(')'),
+ 144..145: NewLine,
+ 145..149: Ident("sort"),
+ 150..163: Ident("media_type_id"),
+ 163..164: NewLine,
],
)
diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__read_csv.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__read_csv.snap
index 451905bccb52..88c6ab620647 100644
--- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__read_csv.snap
+++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__read_csv.snap
@@ -1,10 +1,15 @@
---
source: prqlc/prqlc/tests/integration/queries.rs
-expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nsort media_type_id\n"
+expression: "# sqlite:skip\n# postgres:skip\n# mysql:skip\nfrom (read_csv \"data_file_root/media_types.csv\")\nappend (read_json \"data_file_root/media_types.json\")\nsort media_type_id\n"
input_file: prqlc/prqlc/tests/integration/queries/read_csv.prql
---
1,MPEG audio file
+1,MPEG audio file
+2,Protected AAC audio file
2,Protected AAC audio file
3,Protected MPEG-4 video file
+3,Protected MPEG-4 video file
4,Purchased AAC audio file
+4,Purchased AAC audio file
+5,AAC audio file
5,AAC audio file
diff --git a/prqlc/prqlc/tests/integration/sql.rs b/prqlc/prqlc/tests/integration/sql.rs
index 6e3a10de28f3..3cc5e191a640 100644
--- a/prqlc/prqlc/tests/integration/sql.rs
+++ b/prqlc/prqlc/tests/integration/sql.rs
@@ -5122,6 +5122,66 @@ fn test_read_parquet_with_named_args() {
);
}
+#[test]
+fn test_read_json_duckdb() {
+ assert_snapshot!(compile_with_sql_dialect(r#"
+ from (read_json 'data.json')
+ "#, sql::Dialect::DuckDb).unwrap(),
+ @r"
+ WITH table_0 AS (
+ SELECT
+ *
+ FROM
+ read_json_auto('data.json')
+ )
+ SELECT
+ *
+ FROM
+ table_0
+ "
+ );
+}
+
+#[test]
+fn test_read_json_clickhouse() {
+ assert_snapshot!(compile_with_sql_dialect(r#"
+ from (read_json 'data.json')
+ "#, sql::Dialect::ClickHouse).unwrap(),
+ @r"
+ WITH table_0 AS (
+ SELECT
+ *
+ FROM
+ file('data.json', 'Json')
+ )
+ SELECT
+ *
+ FROM
+ table_0
+ "
+ );
+}
+
+#[test]
+fn test_read_json_generic() {
+ assert_snapshot!(compile(r#"
+ from (read_json 'data.json')
+ "#).unwrap(),
+ @r"
+ WITH table_0 AS (
+ SELECT
+ *
+ FROM
+ read_json('data.json')
+ )
+ SELECT
+ *
+ FROM
+ table_0
+ "
+ );
+}
+
#[test]
fn test_excess_columns() {
// https://github.com/PRQL/prql/issues/2079
diff --git a/web/book/highlight-prql.js b/web/book/highlight-prql.js
index ac9d00b03f44..87551a72ccf5 100644
--- a/web/book/highlight-prql.js
+++ b/web/book/highlight-prql.js
@@ -41,6 +41,7 @@ formatting = function (hljs) {
"sum",
// File reading functions
"read_csv",
+ "read_json",
"read_parquet",
// List functions
"all",
diff --git a/web/book/src/reference/data/read-files.md b/web/book/src/reference/data/read-files.md
index 54dc7a2c3b1a..aa3a5d0fd022 100644
--- a/web/book/src/reference/data/read-files.md
+++ b/web/book/src/reference/data/read-files.md
@@ -1,12 +1,13 @@
# Reading files
-There are a couple of functions mainly designed for DuckDB to read from files:
+There are a few functions mainly designed for DuckDB to read from files:
```prql
prql target:sql.duckdb
-from (read_parquet "artists.parquet")
-join (read_csv "albums.csv") (==track_id)
+from a = (read_parquet "artists.parquet")
+join b = (read_csv "albums.csv") (a.artist_id == b.artist_id)
+join c = (read_json "metadata.json") (a.artist_id == c.artist_id)
```
> [!NOTE] These don't currently have all the DuckDB options. If those would be
diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__0.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__0.snap
index f97d6d8515a2..df36a779d9a9 100644
--- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__0.snap
+++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__0.snap
@@ -1,6 +1,6 @@
---
source: web/book/tests/documentation/book.rs
-expression: "prql target:sql.duckdb\n\nfrom (read_parquet \"artists.parquet\")\njoin (read_csv \"albums.csv\") (==track_id)\n"
+expression: "prql target:sql.duckdb\n\nfrom a = (read_parquet \"artists.parquet\")\njoin b = (read_csv \"albums.csv\") (a.artist_id == b.artist_id)\njoin c = (read_json \"metadata.json\") (a.artist_id == c.artist_id)\n"
---
WITH table_0 AS (
SELECT
@@ -19,10 +19,18 @@ table_1 AS (
*
FROM
read_csv_auto('albums.csv')
+),
+table_2 AS (
+ SELECT
+ *
+ FROM
+ read_json_auto('metadata.json')
)
SELECT
table_0.*,
- table_1.*
+ table_1.*,
+ table_2.*
FROM
table_0
- INNER JOIN table_1 ON table_0.track_id = table_1.track_id
+ INNER JOIN table_1 ON table_0.artist_id = table_1.artist_id
+ INNER JOIN table_2 ON table_0.artist_id = table_2.artist_id
diff --git a/web/prql-codemirror-demo/src/lang-prql/complete.ts b/web/prql-codemirror-demo/src/lang-prql/complete.ts
index 5cb689e98e16..05d6dcd50fd6 100644
--- a/web/prql-codemirror-demo/src/lang-prql/complete.ts
+++ b/web/prql-codemirror-demo/src/lang-prql/complete.ts
@@ -46,6 +46,7 @@ const globals: readonly Completion[] = ["false", "null", "true"]
"sum",
// file-reading-functions
"read_csv",
+ "read_json",
"read_parquet",
// list-functions
"all",
diff --git a/web/website/themes/prql-theme/static/plugins/highlight/prql.js b/web/website/themes/prql-theme/static/plugins/highlight/prql.js
index 0a4bd09f8f24..46f1bf5b186c 100644
--- a/web/website/themes/prql-theme/static/plugins/highlight/prql.js
+++ b/web/website/themes/prql-theme/static/plugins/highlight/prql.js
@@ -29,6 +29,7 @@ formatting = function (hljs) {
"sum",
// File reading functions
"read_csv",
+ "read_json",
"read_parquet",
// List functions
"all",