From 8872d9806bd467888d5837aac1336554d254b1f7 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:43:54 -0500 Subject: [PATCH] test: add test for #7350 --- ibis/examples/tests/test_examples.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ibis/examples/tests/test_examples.py b/ibis/examples/tests/test_examples.py index b17da0ed3227..3d8e8e6da170 100644 --- a/ibis/examples/tests/test_examples.py +++ b/ibis/examples/tests/test_examples.py @@ -119,3 +119,14 @@ def test_load_example(backend_name, example, columns): con = getattr(ibis, backend_name).connect() t = getattr(ibis.examples, example).fetch(backend=con) assert t.columns == columns + + +def test_union_bug(): + t = ibis.examples.penguins.fetch() + t = t.head(100) + + sub1 = t.inner_join(t.view(), "island").mutate(island_right=lambda t: t.island) + sub2 = t.inner_join(t.view(), "sex").mutate(sex_right=lambda t: t.sex) + u = ibis.union(sub1, sub2) + + assert len(u.execute())