From 49ef9086ce614c89b947ce6b498f0de671ef671e Mon Sep 17 00:00:00 2001 From: Jon Burdo Date: Tue, 11 Jul 2023 15:46:56 -0400 Subject: [PATCH] Add missing Array attributes Array previously threw a NotImplementedError for the python_type attribute and returned True instead of False for hashable. --- clickhouse_sqlalchemy/types/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clickhouse_sqlalchemy/types/common.py b/clickhouse_sqlalchemy/types/common.py index d5659f7a..84cd78ff 100644 --- a/clickhouse_sqlalchemy/types/common.py +++ b/clickhouse_sqlalchemy/types/common.py @@ -30,11 +30,17 @@ class Boolean(types.Boolean, ClickHouseTypeEngine): class Array(ClickHouseTypeEngine): __visit_name__ = 'array' + hashable = False + def __init__(self, item_type): self.item_type = item_type self.item_type_impl = to_instance(item_type) super(Array, self).__init__() + @property + def python_type(self): + return list + def literal_processor(self, dialect): item_processor = self.item_type_impl.literal_processor(dialect)