Skip to content

Commit

Permalink
test(flink): ignore row order when comparing unnested array of structs (
Browse files Browse the repository at this point in the history
#8973)

Fixes a flaky test that would fail if the unnested array row order was
different than the input for the flink backend.
  • Loading branch information
cpcloud authored Apr 15, 2024
1 parent de3a169 commit 1ab7fa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
PySparkAnalysisException,
TrinoUserError,
)
from ibis.common.collections import frozendict

pytestmark = [
pytest.mark.never(
Expand Down Expand Up @@ -815,7 +816,9 @@ def test_unnest_struct(con):
result = con.execute(expr)

expected = pd.DataFrame(data).explode("value").iloc[:, 0].reset_index(drop=True)
tm.assert_series_equal(result, expected)
assert frozenset(map(frozendict, result.values)) == frozenset(
map(frozendict, expected.values)
)


@builtin_array
Expand Down

0 comments on commit 1ab7fa8

Please sign in to comment.