-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "test: Refactor book snapshot tests (#1900)"
This reverts commit abc61ff.
- Loading branch information
Showing
194 changed files
with
1,103 additions
and
1,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...t__tests__prql__examples__cte-0.prql.snap → ..._reference_prql@examples__cte-0.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ts__prql__examples__employees-0.prql.snap → ...ence_prql@examples__employees-0.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ts__prql__examples__employees-1.prql.snap → ...ence_prql@examples__employees-1.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ts__prql__examples__employees-2.prql.snap → ...ence_prql@examples__employees-2.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ts__prql__examples__employees-3.prql.snap → ...ence_prql@examples__employees-3.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...sts/snapshots/snapshot__run_display_reference_prql@examples__list-equivalence-0.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: book/tests/snapshot.rs | ||
expression: prql_to_pl(&prql).and_then(pl_to_prql).unwrap() | ||
input_file: book/tests/prql/examples/list-equivalence-0.prql | ||
--- | ||
from employees | ||
select salary | ||
|
||
|
||
|
10 changes: 10 additions & 0 deletions
10
...sts/snapshots/snapshot__run_display_reference_prql@examples__list-equivalence-1.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
source: book/tests/snapshot.rs | ||
expression: prql_to_pl(&prql).and_then(pl_to_prql).unwrap() | ||
input_file: book/tests/prql/examples/list-equivalence-1.prql | ||
--- | ||
from employees | ||
select [salary] | ||
|
||
|
||
|
3 changes: 2 additions & 1 deletion
3
...l__examples__list-equivalence-2.prql.snap → ...ql@examples__list-equivalence-2.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...l__examples__list-equivalence-3.prql.snap → ...ql@examples__list-equivalence-3.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
book/tests/snapshots/snapshot__run_display_reference_prql@examples__misc-0.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
source: book/tests/snapshot.rs | ||
expression: prql_to_pl(&prql).and_then(pl_to_prql).unwrap() | ||
input_file: book/tests/prql/examples/misc-0.prql | ||
--- | ||
let parts = ( | ||
from seq_1_to_5 | ||
) | ||
|
||
|
||
|
||
from pl = prospect_lists_prospects | ||
filter prospect_list_id == "cc675eee-8bd1-237f-be5e-622ba511d65e" | ||
join a = accounts [a.id == pl.related_id] | ||
join er = email_addr_bean_rel [er.bean_id == a.id and er.primary_address == "1"] | ||
join ea = email_addresses [ea.id == er.email_address_id] | ||
select ea.email_address | ||
derive prefix = s"regexp_replace(SUBSTRING_INDEX({email_address}, '@', 1), '[.0-9-_:]+', '.')" | ||
derive stub = s"SUBSTRING_INDEX(SUBSTRING_INDEX({prefix}, '.', part), '.', -1)" | ||
select [ | ||
email_address, | ||
stub, | ||
] | ||
|
||
|
||
|
13 changes: 13 additions & 0 deletions
13
book/tests/snapshots/snapshot__run_display_reference_prql@examples__misc-1.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
source: book/tests/snapshot.rs | ||
expression: prql_to_pl(&prql).and_then(pl_to_prql).unwrap() | ||
input_file: book/tests/prql/examples/misc-1.prql | ||
--- | ||
from club_ratings | ||
filter rating != null | ||
group year ( | ||
derive [rating_norm = rating - ( average rating ) / ( stddev rating )] | ||
) | ||
|
||
|
||
|
32 changes: 32 additions & 0 deletions
32
book/tests/snapshots/snapshot__run_display_reference_prql@examples__variables-0.prql.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
source: book/tests/snapshot.rs | ||
expression: prql_to_pl(&prql).and_then(pl_to_prql).unwrap() | ||
input_file: book/tests/prql/examples/variables-0.prql | ||
--- | ||
from employees | ||
filter country == "USA" | ||
derive [ | ||
gross_salary = salary + payroll_tax, | ||
gross_cost = gross_salary + benefits_cost, | ||
] | ||
filter gross_cost > 0 | ||
group [ | ||
title, | ||
country, | ||
] ( | ||
aggregate [ | ||
average salary, | ||
average gross_salary, | ||
sum salary, | ||
sum gross_salary, | ||
average gross_cost, | ||
sum_gross_cost = sum gross_cost, | ||
ct = count, | ||
] | ||
) | ||
sort sum_gross_cost | ||
filter ct > 200 | ||
take 20 | ||
|
||
|
||
|
Oops, something went wrong.