Skip to content

Commit 2d14c91

Browse files
committed
internal: Retain some changes from PRQL#2617
1 parent aa3ed61 commit 2d14c91

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

bindings/prql-python/python/tests/conftest.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

bindings/prql-python/python/tests/test_website_queries.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
import re
22

33
import prql_python as prql
4+
import pytest
5+
import yaml
6+
7+
8+
@pytest.fixture()
9+
def example_queries():
10+
website_path = "../../web/website/content/_index.md"
11+
with open(website_path, "r") as f:
12+
website = f.read()
13+
website_yaml = yaml.safe_load(website.replace("---", ""))
14+
showcase_section = website_yaml["showcase_section"]["examples"]
15+
return showcase_section
416

517

618
def normalize(sql: str) -> str:
@@ -18,5 +30,5 @@ def test_all_examples(example_queries):
1830
compiled_normalized = normalize(compiled)
1931
truth_normalized = normalize(query["sql"])
2032
assert (
21-
truth_normalized == compiled_normalized
33+
compiled_normalized == truth_normalized
2234
), f"Failed on Query ID: '{query['id']}'"

web/book/src/transforms/sort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The explicit semantics are:
5757

5858
- `sort` introduces a new order,
5959
- `group` resets the order,
60-
- `join` maintains the order of the left relation,
60+
- `join` retains the order of the left relation,
6161
- database tables don't have a known order.
6262

6363
Comparatively, in SQL, relations possess no order, being orderable solely within

0 commit comments

Comments
 (0)