long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.
https://github.com/long2ice/asynch
Apache License 2.0
186 stars 43 forks source link

Add big decimal #45

Closed geronimogoemon closed 2 years ago

geronimogoemon commented 2 years ago

Hello!

I have found myself in need of the maximal Decimal allowed by clickhouse which is Decimal(76, ..). Unfortunately, I have noticed that asynch supports only up to Decimal128. I have therefore looked up the code in clickhouse_driver https://github.com/mymarilyn/clickhouse-driver/blob/master/clickhouse_driver/columns/decimalcolumn.py copied it over and adjusted a little bit to make it work with async.

Does this look alright?

Additionally, to make it work it requires the pending PR https://github.com/long2ice/asynch/pull/42 so I branched from the top of it.

long2ice commented 2 years ago

Thanks! Please rebase dev and make ci pass

randomowo commented 2 years ago

57