zhjwpku commented on issue #116: URL: https://github.com/apache/iceberg-cpp/issues/116#issuecomment-3193616607
After experimenting on Godbolt, I found that using the following declaration works well to represent int128_t. However, when trying to build Decimal128 with it, I realized that adapting certain decimal functions becomes difficult and the implementation is prone to bugs. Therefore, I decide to follow Arrow's approach and extract the Decimal128 implementation from Arrow into iceberg-cpp. Adoption of int128_t can come later if we found it necessary. ``` #if defined(_MSC_VER) # include <__msvc_int128.hpp> using int128_t = ::std::_Signed128; using uint128_t = ::std::_Unsigned128; #elif defined(__GNUC__) || defined(__clang__) using int128_t = __int128; using uint128_t = unsigned __int128; #else # error "128-bit integer type is not supported on this platform" #endif ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
