diff --git a/.config/insta.yaml b/.config/insta.yaml index d0f1ca92d396..e7059fe49faa 100644 --- a/.config/insta.yaml +++ b/.config/insta.yaml @@ -1,6 +1,5 @@ behavior: - # Disabling because of issues with running on Windows - # force_update: true + require_full_match: true review: # The default (true) has a small performance hit and never needed for us warn_undiscovered: false diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__cli__debug.snap b/prqlc/prqlc/tests/integration/snapshots/integration__cli__debug.snap index 0ca376af5a8b..72c3437b0877 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__cli__debug.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__cli__debug.snap @@ -214,4 +214,3 @@ module default_db { let main <[{*..}]> = default_db.tracks ----- stderr ----- - diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__text_module.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__text_module.snap index 7d4357325fab..186cc9347f83 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__text_module.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__text_module.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:test\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" +expression: "# mssql:test\n# glaredb:skip — TODO: started raising an error on 2024-05-20; see `window.prql`\n# for more details\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" input_file: prqlc/prqlc/tests/integration/queries/text_module.prql --- WITH table_0 AS ( @@ -37,4 +37,3 @@ WHERE OR title LIKE CONCAT('%', 'os') ORDER BY title - diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__window.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__window.snap index 3e6b202bded8..7ba8bae4a2b9 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__window.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__compile__window.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" +expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\n# glaredb:skip — TODO: started raising an error on 2024-05-20, from https://github.com/PRQL/prql/actions/runs/9154902656/job/25198160283:\n # ERROR: This feature is not implemented: Unsupported ast node in sqltorel:\n # Substring { expr: Identifier(Ident { value: \"title\", quote_style: None }),\n # substring_from: Some(Value(Number(\"2\", false))), substring_for:\n # Some(Value(Number(\"5\", false))), special: true }\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" input_file: prqlc/prqlc/tests/integration/queries/window.prql --- WITH table_0 AS ( @@ -56,4 +56,3 @@ FROM ORDER BY genre_id, milliseconds - diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__text_module.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__text_module.snap index 8bb2b5b6d43f..a0d0cc4bf01d 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__text_module.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__text_module.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:test\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" +expression: "# mssql:test\n# glaredb:skip — TODO: started raising an error on 2024-05-20; see `window.prql`\n# for more details\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" input_file: prqlc/prqlc/tests/integration/queries/text_module.prql --- from albums @@ -21,4 +21,3 @@ filter ((title | text.starts_with "Black") || ( title text.contains "Sabbath" )) || (title | text.ends_with "os") - diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__window.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__window.snap index b062e5c5bbda..6b6f6d799841 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__window.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__fmt__window.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" +expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\n# glaredb:skip — TODO: started raising an error on 2024-05-20, from https://github.com/PRQL/prql/actions/runs/9154902656/job/25198160283:\n # ERROR: This feature is not implemented: Unsupported ast node in sqltorel:\n # Substring { expr: Identifier(Ident { value: \"title\", quote_style: None }),\n # substring_from: Some(Value(Number(\"2\", false))), substring_for:\n # Some(Value(Number(\"5\", false))), special: true }\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" input_file: prqlc/prqlc/tests/integration/queries/window.prql --- from tracks @@ -16,4 +16,3 @@ group genre_id ( sort {genre_id, milliseconds} select {track_id, genre_id, num, total, last_val} filter genre_id >= 22 - diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__text_module.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__text_module.snap index 00eb908f9c09..ddf4ee8a7879 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__text_module.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__text_module.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:test\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" +expression: "# mssql:test\n# glaredb:skip — TODO: started raising an error on 2024-05-20; see `window.prql`\n# for more details\nfrom albums\nselect {\n title,\n title_and_spaces = f\" {title} \",\n low = title | text.lower,\n up = title | text.upper,\n ltrimmed = title | text.ltrim,\n rtrimmed = title | text.rtrim,\n trimmed = title | text.trim,\n len = title | text.length,\n subs = title | text.extract 2 5,\n replace = title | text.replace \"al\" \"PIKA\",\n}\nsort {title}\nfilter (title | text.starts_with \"Black\") || (title | text.contains \"Sabbath\") || (title | text.ends_with \"os\")\n" input_file: prqlc/prqlc/tests/integration/queries/text_module.prql --- Bach: The Brandenburg Concertos, Bach: The Brandenburg Concertos ,bach: the brandenburg concertos,BACH: THE BRANDENBURG CONCERTOS,Bach: The Brandenburg Concertos,Bach: The Brandenburg Concertos,Bach: The Brandenburg Concertos,31,ach: ,Bach: The Brandenburg Concertos diff --git a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__window.snap b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__window.snap index ed74c797e36a..1bf85e1aa630 100644 --- a/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__window.snap +++ b/prqlc/prqlc/tests/integration/snapshots/integration__queries__results__window.snap @@ -1,6 +1,6 @@ --- source: prqlc/prqlc/tests/integration/queries.rs -expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" +expression: "# mssql:skip Conversion(\"cannot interpret I64(Some(1)) as an i32 value\")', connection.rs:200:34\n# duckdb:skip problems with DISTINCT ON (duckdb internal error: [with INPUT_TYPE = int; RESULT_TYPE = unsigned char]: Assertion `min_val <= input' failed.)\n# clickhouse:skip problems with DISTINCT ON\n# postgres:skip problems with DISTINCT ON\n# glaredb:skip — TODO: started raising an error on 2024-05-20, from https://github.com/PRQL/prql/actions/runs/9154902656/job/25198160283:\n # ERROR: This feature is not implemented: Unsupported ast node in sqltorel:\n # Substring { expr: Identifier(Ident { value: \"title\", quote_style: None }),\n # substring_from: Some(Value(Number(\"2\", false))), substring_for:\n # Some(Value(Number(\"5\", false))), special: true }\nfrom tracks\ngroup genre_id (\n sort milliseconds\n derive {\n num = row_number this,\n total = count this,\n last_val = last track_id,\n }\n take 10\n)\nsort {genre_id, milliseconds}\nselect {track_id, genre_id, num, total, last_val}\nfilter genre_id >= 22\n" input_file: prqlc/prqlc/tests/integration/queries/window.prql --- 3219,22,1,17,3219 diff --git a/web/book/tests/documentation/snapshots/documentation__book__project__target__version__0.snap b/web/book/tests/documentation/snapshots/documentation__book__project__target__version__0.snap index 9307260dd342..69b8c5e11c09 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__project__target__version__0.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__project__target__version__0.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "prql version:\"0.11.4\"\n\nfrom employees\n" +expression: "prql version:\"0.11.5\"\n\nfrom employees\n" --- SELECT * FROM employees - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__0.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__0.snap index 5853c678892a..78ddef6e65b2 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__0.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__0.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.artists\n" +expression: "from artists\n" --- SELECT * FROM artists - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__1.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__1.snap index c11293b631a9..477b694cdbab 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__1.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from e = db.employees\nselect e.first_name\n" +expression: "from e = employees\nselect e.first_name\n" --- SELECT first_name FROM employees AS e - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__2.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__2.snap index 3e2fc2732832..85f3de1b0c9a 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__2.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__from__2.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.`artist tracks`\n" +expression: "from `artist tracks`\n" --- SELECT * FROM "artist tracks" - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__1.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__1.snap index a1af2ce1901f..2a9009647462 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__read-files__reading-files__1.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.`artists.parquet`\n" +expression: "from `artists.parquet`\n" --- SELECT * FROM "artists.parquet" - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__data__relation-literals__array-literals__1.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__data__relation-literals__array-literals__1.snap index 49f26d23636a..91bcc06a73c6 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__data__relation-literals__array-literals__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__data__relation-literals__array-literals__1.snap @@ -1,6 +1,6 @@ --- source: web/book/tests/documentation/book.rs -expression: "let my_artists = [\n {artist=\"Miles Davis\"},\n {artist=\"Marvin Gaye\"},\n {artist=\"James Brown\"},\n]\n\nfrom db.artists\njoin my_artists (==artist)\njoin db.albums (==artist_id)\nselect {artists.artist_id, albums.title}\n" +expression: "let my_artists = [\n {artist=\"Miles Davis\"},\n {artist=\"Marvin Gaye\"},\n {artist=\"James Brown\"},\n]\n\nfrom artists\njoin my_artists (==artist)\njoin albums (==artist_id)\nselect {artists.artist_id, albums.title}\n" --- WITH table_0 AS ( SELECT @@ -27,4 +27,3 @@ FROM artists JOIN my_artists ON artists.artist = my_artists.artist JOIN albums ON artists.artist_id = albums.artist_id - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__0.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__0.snap index 132aa97a9fcf..c93bd09a43a9 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__0.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__0.snap @@ -1,6 +1,6 @@ --- source: web/book/tests/documentation/book.rs -expression: "let top_50 = (\n from db.employees\n sort salary\n take 50\n aggregate {total_salary = sum salary}\n)\n\ntop_50 # Starts a new pipeline\n" +expression: "let top_50 = (\n from employees\n sort salary\n take 50\n aggregate {total_salary = sum salary}\n)\n\nfrom top_50 # Starts a new pipeline\n" --- WITH table_0 AS ( SELECT @@ -21,4 +21,3 @@ SELECT total_salary FROM top_50 - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__1.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__1.snap index 9696f72ac2e4..9c63323c39b1 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__1.snap @@ -1,6 +1,6 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.employees\ntake 50\ninto first_50\n\nfirst_50\n" +expression: "from employees\ntake 50\ninto first_50\n\nfrom first_50\n" --- WITH first_50 AS ( SELECT @@ -14,4 +14,3 @@ SELECT * FROM first_50 - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__2.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__2.snap index fdd8185943cd..0ea02f02ac52 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__2.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__declarations__variables__variables--__2.snap @@ -1,6 +1,6 @@ --- source: web/book/tests/documentation/book.rs -expression: "let grouping = s\"\"\"\n SELECT SUM(a)\n FROM tbl\n GROUP BY\n GROUPING SETS\n ((b, c, d), (d), (b, d))\n\"\"\"\n\ngrouping\n" +expression: "let grouping = s\"\"\"\n SELECT SUM(a)\n FROM tbl\n GROUP BY\n GROUPING SETS\n ((b, c, d), (d), (b, d))\n\"\"\"\n\nfrom grouping\n" --- WITH table_0 AS ( SELECT @@ -14,4 +14,3 @@ SELECT * FROM table_0 - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__0.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__0.snap index ede0750cf87f..b142f736c9eb 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__0.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__0.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.employees\nselect department\ngroup employees.* (\n take 1\n)\n" +expression: "from employees\nselect department\ngroup employees.* (\n take 1\n)\n" --- SELECT DISTINCT department FROM employees - diff --git a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__1.snap b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__1.snap index 8c285298c54e..8fb5df9a66a8 100644 --- a/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__1.snap +++ b/web/book/tests/documentation/snapshots/documentation__book__reference__stdlib__distinct__how-do-i-remove-duplicates__1.snap @@ -1,9 +1,8 @@ --- source: web/book/tests/documentation/book.rs -expression: "from db.employees\ngroup employees.* (take 1)\n" +expression: "from employees\ngroup employees.* (take 1)\n" --- SELECT DISTINCT * FROM employees -