summaryrefslogtreecommitdiffstats
path: root/tests/test_schema.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-29 13:02:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-29 13:02:26 +0000
commita299be925028c6243d34b020920dfd0135bb9574 (patch)
tree39a7a231466fd9d139047a67672f09040dd23394 /tests/test_schema.py
parentAdding upstream version 16.4.2. (diff)
downloadsqlglot-a299be925028c6243d34b020920dfd0135bb9574.tar.xz
sqlglot-a299be925028c6243d34b020920dfd0135bb9574.zip
Adding upstream version 16.7.3.upstream/16.7.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_schema.py')
-rw-r--r--tests/test_schema.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_schema.py b/tests/test_schema.py
index 23690b9..b89754f 100644
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -227,12 +227,14 @@ class TestSchema(unittest.TestCase):
self.assertEqual(schema.column_names(exp.Table(this="x")), ["foo"])
# Check that the correct dialect is used when calling schema methods
+ # Note: T-SQL is case-insensitive by default, so `fo` in clickhouse will match the normalized table name
schema = MappingSchema(schema={"[Fo]": {"x": "int"}}, dialect="tsql")
self.assertEqual(
- schema.column_names("[Fo]"), schema.column_names("`Fo`", dialect="clickhouse")
+ schema.column_names("[Fo]"), schema.column_names("`fo`", dialect="clickhouse")
)
# Check that all column identifiers are normalized to lowercase for BigQuery, even quoted
# ones. Also, ensure that tables aren't normalized, since they're case-sensitive by default.
schema = MappingSchema(schema={"Foo": {"`BaR`": "int"}}, dialect="bigquery")
self.assertEqual(schema.column_names("Foo"), ["bar"])
+ self.assertEqual(schema.column_names("foo"), [])