You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/02/18 01:25:30 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #8221: Ensure partition function never return negative partition

Jackie-Jiang commented on a change in pull request #8221:
URL: https://github.com/apache/pinot/pull/8221#discussion_r809603873



##########
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:
       Sounds good. This is the same as `ByteArrayPartitionFunction`, so I'll also change that




-- 
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: commits-unsubscribe@pinot.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org