SammyVimes commented on code in PR #1289:
URL: https://github.com/apache/ignite-3/pull/1289#discussion_r1012290339
##########
modules/platforms/cpp/ignite/schema/binary_tuple_builder.h:
##########
@@ -431,7 +552,11 @@ class binary_tuple_builder {
* @return Required size.
*/
static SizeT gauge_number(const big_decimal &value) noexcept {
- return SizeT(value.is_zero() ? 0 :
value.get_unscaled_value().byte_size());
+ if (value.is_zero()) {
+ return 0;
+ }
+
+ return 4 /* scale */ + value.get_unscaled_value().byte_size();
Review Comment:
Right, fixed
##########
modules/platforms/cpp/ignite/schema/binary_tuple_parser.cpp:
##########
@@ -251,6 +252,12 @@ big_integer binary_tuple_parser::get_number(bytes_view
bytes) {
return big_integer(bytes.data(), bytes.size());
}
+big_decimal binary_tuple_parser::get_decimal(bytes_view bytes) {
+ auto scale = load_as<std::int32_t>(bytes);
Review Comment:
Fixed
--
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]