summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_optimizer.py')
-rw-r--r--tests/test_optimizer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index e001c1f..4415e03 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -858,3 +858,8 @@ FROM READ_CSV('tests/fixtures/optimizer/tpc-h/nation.csv.gz', 'delimiter', '|')
),
parse_one('SELECT "a"."a" AS "a", "a"."b" AS "b" FROM "a" AS "a"'),
)
+
+ def test_semistructured(self):
+ query = parse_one("select a.b:c from d", read="snowflake")
+ qualified = optimizer.qualify.qualify(query)
+ self.assertEqual(qualified.expressions[0].alias, "c")