diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-12-22 07:22:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-12-22 07:22:56 +0000 |
commit | 85bf7f61d00f60343363b7c6dc98f2d0b5a8e621 (patch) | |
tree | 76c8712faaa2753e3997de25eb3a69c3ec450979 /tests/test_schema.py | |
parent | Adding upstream version 10.2.6. (diff) | |
download | sqlglot-85bf7f61d00f60343363b7c6dc98f2d0b5a8e621.tar.xz sqlglot-85bf7f61d00f60343363b7c6dc98f2d0b5a8e621.zip |
Adding upstream version 10.2.9.upstream/10.2.9
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_schema.py')
-rw-r--r-- | tests/test_schema.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_schema.py b/tests/test_schema.py index f1e12a2..6c1ca9c 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -1,6 +1,6 @@ import unittest -from sqlglot import exp, to_table +from sqlglot import exp, parse_one, to_table from sqlglot.errors import SchemaError from sqlglot.schema import MappingSchema, ensure_schema @@ -181,3 +181,6 @@ class TestSchema(unittest.TestCase): schema.get_column_type(exp.Table(this="c", db="b", catalog="a"), "d").this, exp.DataType.Type.VARCHAR, ) + + schema = MappingSchema({"foo": {"bar": parse_one("INT", into=exp.DataType)}}) + self.assertEqual(schema.get_column_type("foo", "bar").this, exp.DataType.Type.INT) |