For supporting decimal256 datatype, the Int128 datatype has been globally updated across the project.
The previously used absl library has been deprecated in favor of proton's wide::Integer.
Now, the overload of the decimal Append function is ambiguous. When appending string type data to a decimal, the type must be explicitly specified for the compilation to succeed; otherwise, the following error will occur:
/home/kongsha/develop/timeplus-cpp/ut/client_ut.cpp: In member function ‘virtual void ClientCase_Decimal_Test::TestBody()’:
/home/kongsha/develop/timeplus-cpp/ut/client_ut.cpp:674:19: error: call of overloaded ‘Append(const char [11])’ is ambiguous
674 | d1->Append(("12345.6789"));
| ~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /home/kongsha/develop/timeplus-cpp/timeplus/columns/date.h:3,
from /home/kongsha/develop/timeplus-cpp/timeplus/client.h:7,
from /home/kongsha/develop/timeplus-cpp/ut/client_ut.cpp:1:
/home/kongsha/develop/timeplus-cpp/timeplus/columns/decimal.h:17:10: note: candidate: ‘void timeplus::ColumnDecimal::Append(const Int256&)’
17 | void Append(const Int256& value);
| ^~~~~~
/home/kongsha/develop/timeplus-cpp/timeplus/columns/decimal.h:18:10: note: candidate: ‘void timeplus::ColumnDecimal::Append(const string&)’
18 | void Append(const std::string& value);
| ^~~~~~
d1->Append(static_cast<std::string>("12345.6789")); is ok.
For supporting decimal256 datatype, the Int128 datatype has been globally updated across the project. The previously used absl library has been deprecated in favor of proton's wide::Integer.
d1->Append(static_cast<std::string>("12345.6789"));
is ok.