From ca57dc468e5d8d0920e964d45ad25271ae6e633d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 24 Jul 2023 10:03:45 +0200 Subject: Adding upstream version 17.7.0. Signed-off-by: Daniel Baumann --- tests/test_lineage.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test_lineage.py') diff --git a/tests/test_lineage.py b/tests/test_lineage.py index f33a2c2..0fd9da8 100644 --- a/tests/test_lineage.py +++ b/tests/test_lineage.py @@ -186,3 +186,16 @@ class TestLineage(unittest.TestCase): self.assertEqual(downstream.alias, "") self.assertEqual(downstream.downstream, []) + + def test_lineage_union(self) -> None: + node = lineage( + "x", + "SELECT ax AS x FROM a UNION SELECT bx FROM b UNION SELECT cx FROM c", + ) + assert len(node.downstream) == 3 + + node = lineage( + "x", + "SELECT x FROM (SELECT ax AS x FROM a UNION SELECT bx FROM b UNION SELECT cx FROM c)", + ) + assert len(node.downstream) == 3 -- cgit v1.2.3