long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.

Home Page:https://github.com/long2ice/asynch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception In select with LowCardinalityColumn

reclosedev opened this issue · comments

lib/python3.8/site-packages/asynch/proto/columns/base.py:102: in read_data
    return await self._read_data(n_items, nulls_map=nulls_map)
lib/python3.8/site-packages/asynch/proto/columns/lowcardinalitycolumn.py:106: in _read_data
    keys_column = self.int_types[key_type]()
lib/python3.8/site-packages/asynch/proto/columns/intcolumn.py:41: in __init__
    super(UIntColumn, self).__init__(types_check=types_check, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asynch.proto.columns.intcolumn.UInt8Column object at 0x7f3176a4c880>
types_check = False, kwargs = {}

    def __init__(self, types_check=False, **kwargs):
>       super(IntColumn, self).__init__(types_check=types_check, **kwargs)
E       TypeError: __init__() missing 2 required positional arguments: 'reader' and 'writer'

lib/python3.8/site-packages/asynch/proto/columns/intcolumn.py:12: TypeError

Quick fix is to add required kwargs here:

keys_column = self.int_types[key_type]()

keys_column = self.int_types[key_type](reader=self.reader, writer=self.writer)

Could you give a pr?

@long2ice I've made a PR #18 with fix and tests.

If it's ok, could you please make release after merge?