Skip to content

Commit

Permalink
Change Array to subclass SQLAlchemy's ARRAY
Browse files Browse the repository at this point in the history
Array previously threw a NotImplementedError for the python_type
attribute and returned True for hashable. After inheriting from
SQLAlchemy's ARRAY type, it returns list and False as expected.
  • Loading branch information
jonburdo committed Jul 11, 2023
1 parent 800dcfb commit 434996d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clickhouse_sqlalchemy/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ class Boolean(types.Boolean, ClickHouseTypeEngine):
pass


class Array(ClickHouseTypeEngine):
class Array(types.ARRAY, ClickHouseTypeEngine):
__visit_name__ = 'array'

def __init__(self, item_type):
self.item_type = item_type
self.item_type_impl = to_instance(item_type)
super(Array, self).__init__()
super(Array, self).__init__(item_type)

def literal_processor(self, dialect):
item_processor = self.item_type_impl.literal_processor(dialect)
Expand Down

0 comments on commit 434996d

Please sign in to comment.