diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 05:35:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 05:35:50 +0000 |
commit | 8f1b330983bddb35e2ec61a5667a84318bad88ef (patch) | |
tree | 32b74e964839c34014d31ec828fc6521323b9edc /tests/test_lineage.py | |
parent | Adding upstream version 23.13.7. (diff) | |
download | sqlglot-8f1b330983bddb35e2ec61a5667a84318bad88ef.tar.xz sqlglot-8f1b330983bddb35e2ec61a5667a84318bad88ef.zip |
Adding upstream version 23.16.0.upstream/23.16.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_lineage.py')
-rw-r--r-- | tests/test_lineage.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_lineage.py b/tests/test_lineage.py index 3e17f95..036f146 100644 --- a/tests/test_lineage.py +++ b/tests/test_lineage.py @@ -487,3 +487,11 @@ class TestLineage(unittest.TestCase): downstream = node.downstream[0] self.assertEqual(downstream.name, "z.a") self.assertEqual(downstream.source.sql(), "SELECT y.a AS a, y.b AS b, y.c AS c FROM y AS y") + + def test_node_name_doesnt_contain_comment(self) -> None: + sql = "SELECT * FROM (SELECT x /* c */ FROM t1) AS t2" + node = lineage("x", sql) + + self.assertEqual(len(node.downstream), 1) + self.assertEqual(len(node.downstream[0].downstream), 1) + self.assertEqual(node.downstream[0].downstream[0].name, "t1.x") |