From 3741cd0363e1c08c0b5f73c8207e8be72a778f17 Mon Sep 17 00:00:00 2001 From: Shige Takeda Date: Tue, 9 Apr 2019 01:04:43 +0000 Subject: [PATCH] SNOW-74190: fixed comments query --- snowdialect.py | 3 ++- test/test_core.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/snowdialect.py b/snowdialect.py index 16c7b9ac..5221b3dd 100644 --- a/snowdialect.py +++ b/snowdialect.py @@ -392,7 +392,8 @@ def _get_columns_for_tables(self, connection, schema, **kw): ic.numeric_scale, ic.is_nullable, ic.column_default, - ic.is_identity + ic.is_identity, + ic.comment FROM information_schema.columns ic WHERE ic.table_schema=%(table_schema)s """ diff --git a/test/test_core.py b/test/test_core.py index 29c2ae58..e759997c 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -969,7 +969,7 @@ def test_copy_into_location(engine_testaccount, sql_compiler): food_items.drop(engine_testaccount) def test_comments(engine_testaccount): - table_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(5)) + table_name = ''.join(random.choice(string.ascii_uppercase) for _ in range(5)) try: engine_testaccount.execute("create table public.{} (\"col1\" text);".format(table_name)) engine_testaccount.execute("alter table public.{} alter \"col1\" comment 'this is my comment'".format(table_name))