ptupitsyn commented on code in PR #2282:
URL: https://github.com/apache/ignite-3/pull/2282#discussion_r1262358249


##########
modules/core/src/main/java/org/apache/ignite/internal/util/HashCalculator.java:
##########
@@ -94,6 +96,15 @@ public void appendNull() {
         appendByte((byte) 0);
     }
 
+    /**
+     * Append boolean to hash calculation.
+     *
+     * @param v Value to update hash.
+     */
+    public void appendBoolean(boolean v) {
+        hash = HashUtils.hash32(ByteUtils.booleanToByte(v), hash);
+    }

Review Comment:
   Please note the pattern with other existing methods. We should have 
something like this:
   
   ```java
       public static int hashBoolean(boolean v) {
           return HashUtils.hash32(ByteUtils.booleanToByte(v));
       }
   
       public void appendBoolean(boolean v) {
           hash = combine(hash, hashBoolean(v));
       }
   ```



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to