1
0
Fork 0

Adding upstream version 10.2.9.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 14:59:33 +01:00
parent 237ed30eb6
commit 275e9758ad
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
13 changed files with 91 additions and 26 deletions

View file

@ -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)