ademakov commented on code in PR #1289:
URL: https://github.com/apache/ignite-3/pull/1289#discussion_r1011800063
##########
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:
This violates Binary Tuple Format. We don't store decimal scale in binary
tuple. It is stored in schema.
--
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]