From 1ab7fa8ce010dcbf393f7871474f756379a7f3b8 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:34:54 -0400 Subject: [PATCH] test(flink): ignore row order when comparing unnested array of structs (#8973) Fixes a flaky test that would fail if the unnested array row order was different than the input for the flink backend. --- ibis/backends/tests/test_array.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibis/backends/tests/test_array.py b/ibis/backends/tests/test_array.py index 757c5618fc5a..c68fd4a3243b 100644 --- a/ibis/backends/tests/test_array.py +++ b/ibis/backends/tests/test_array.py @@ -30,6 +30,7 @@ PySparkAnalysisException, TrinoUserError, ) +from ibis.common.collections import frozendict pytestmark = [ pytest.mark.never( @@ -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