ClickHouse / clickhouse-cpp

C++ client library for ClickHouse
Apache License 2.0
306 stars 159 forks source link

Support Decimal256 #377

Open thomasj02 opened 4 months ago

thomasj02 commented 4 months ago

Clickhouse supports Decimal256, with precision up to 76 (https://clickhouse.com/docs/en/sql-reference/data-types/decimal). However, clickhouse-cpp only supports up to Decimal128.

Abseil doesn't have an int256, but boost::multiprecision does (https://www.boost.org/doc/libs/1_85_0/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html). There are many other int256 implementations available online, and clang has support for _BitInt(256)