richardstartin commented on a change in pull request #8221:
URL: https://github.com/apache/pinot/pull/8221#discussion_r809575579



##########
File path: 
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/partition/HashCodePartitionFunction.java
##########
@@ -57,4 +56,8 @@ public int getNumPartitions() {
   public String toString() {
     return NAME;
   }
+
+  private int abs(int n) {
+    return (n == Integer.MIN_VALUE) ? 0 : Math.abs(n);

Review comment:
       this is equivalent to `Math.abs(n) & Integer.MAX_VALUE` but the callers 
could just move the modulo inside the `Math.abs` to avoid dealing with 
`Integer.MIN_VALUE`




-- 
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]

Reply via email to