Skip to content

Commit

Permalink
test(duckdb): relax parquet partitioning test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 6, 2024
1 parent 3a72fe9 commit f8a0ecb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ibis/backends/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,17 @@ def test_roundtrip_partitioned_parquet(tmp_path, con, backend, awards_players):

# Reingest and compare schema
reingest = con.read_parquet(outparquet / "*" / "*")
reingest = reingest.cast({"yearID": "int64"})

# avoid type comparison to appease duckdb: as of 0.8.0 it returns large_string
assert reingest.schema().names == awards_players.schema().names
assert reingest.schema().keys() == awards_players.schema().keys()

reingest = reingest.order_by(["yearID", "playerID", "awardID", "lgID"])
awards_players = awards_players.order_by(["yearID", "playerID", "awardID", "lgID"])

backend.assert_frame_equal(reingest.to_pandas(), awards_players.to_pandas())
# reorder columns to match the partitioning
backend.assert_frame_equal(
reingest.to_pandas(), awards_players[reingest.columns].to_pandas()
)


@pytest.mark.parametrize("ftype", ["csv", "parquet"])
Expand Down

0 comments on commit f8a0ecb

Please sign in to comment.