summaryrefslogtreecommitdiffstats
path: root/tests/test_schema.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:39 +0000
commitf10d022e11dcd1015db1a74ce9f4198ebdcb7f40 (patch)
treeac7bdc1d214a0f97f991cff14e933f4895ee68e1 /tests/test_schema.py
parentReleasing progress-linux version 18.11.6-1. (diff)
downloadsqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.tar.xz
sqlglot-f10d022e11dcd1015db1a74ce9f4198ebdcb7f40.zip
Merging upstream version 18.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_schema.py')
-rw-r--r--tests/test_schema.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_schema.py b/tests/test_schema.py
index 626fa11..34c507d 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -272,3 +272,8 @@ class TestSchema(unittest.TestCase):
str(ctx.exception),
"Table z must match the schema's nesting level: 2.",
)
+
+ def test_has_column(self):
+ schema = MappingSchema({"x": {"c": "int"}})
+ self.assertTrue(schema.has_column("x", exp.column("c")))
+ self.assertFalse(schema.has_column("x", exp.column("k")))