Skip to content

Commit

Permalink
chore: Fix ordering in sql tests (#3596)
Browse files Browse the repository at this point in the history
Co-authored-by: Colin Ho <[email protected]>
  • Loading branch information
colin-ho and Colin Ho authored Dec 18, 2024
1 parent 8620635 commit cc5ad00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/dataframe/test_intersect.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def test_simple_intersect(make_df):
df1 = make_df({"foo": [1, 2, 3]})
df2 = make_df({"bar": [2, 3, 4]})
result = df1.intersect(df2)
result = df1.intersect(df2).sort(by="foo")
assert result.to_pydict() == {"foo": [2, 3]}


Expand Down
7 changes: 3 additions & 4 deletions tests/integration/sql/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
version: '3.7'
services:
trino:
image: trinodb/trino
image: trinodb/trino:467
container_name: trino
ports:
- 8080:8080

postgres:
image: postgres:latest
image: postgres:17.2
container_name: postgres
environment:
POSTGRES_DB: postgres
Expand All @@ -19,7 +18,7 @@ services:
- postgres_data:/var/lib/postgresql/data

mysql:
image: mysql:latest
image: mysql:9.1
container_name: mysql
environment:
MYSQL_DATABASE: mysql
Expand Down
5 changes: 2 additions & 3 deletions tests/sql/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,8 @@ def test_sql_tbl_alias():

def test_sql_distinct():
df = daft.from_pydict({"n": [1, 1, 2, 2]})
actual = daft.sql("SELECT DISTINCT n FROM df").collect().to_pydict()
expected = df.distinct().collect().to_pydict()
assert actual == expected
df = daft.sql("SELECT DISTINCT n FROM df").collect().to_pydict()
assert set(df["n"]) == {1, 2}


@pytest.mark.parametrize(
Expand Down

0 comments on commit cc5ad00

Please sign in to comment.