You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/11/02 13:51:01 UTC

[GitHub] [ignite-3] ademakov commented on a diff in pull request #1289: IGNITE-18017 Add C++ tests for binary tuple

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org