1
0
Fork 0

Adding upstream version 10.5.10.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:06:33 +01:00
parent 556602e7d9
commit 26f20be569
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
43 changed files with 1384 additions and 356 deletions

20
tests/test_lineage.py Normal file
View file

@ -0,0 +1,20 @@
import unittest
from sqlglot.lineage import lineage
class TestLineage(unittest.TestCase):
maxDiff = None
def test_lineage(self) -> None:
node = lineage(
"a",
"SELECT a FROM y",
schema={"x": {"a": "int"}},
sources={"y": "SELECT * FROM x"},
)
self.assertEqual(
node.source.sql(),
"SELECT y.a AS a FROM (SELECT x.a AS a FROM x AS x) AS y /* source: y */",
)
self.assertGreater(len(node.to_html()._repr_html_()), 1000)