mayankshriv commented on a change in pull request #6929: URL: https://github.com/apache/incubator-pinot/pull/6929#discussion_r633764172
########## File path: .gitignore ########## @@ -26,6 +26,7 @@ docs/_build **/.env **/.factorypath kubernetes/examples/helm/charts/ +examples/ Review comment: Hmm, I see. Reverted. ########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/partition/ModuloPartitionFunction.java ########## @@ -53,6 +53,9 @@ public ModuloPartitionFunction(int numPartitions) { public int getPartition(Object value) { if (value instanceof Integer) { return ((Integer) value) % _numPartitions; + } else if (value instanceof Long) { + // Since _numPartitions is int, the modulo should also be int. + return (int) (((Long) value) % _numPartitions); } else if (value instanceof String) { return ((Integer.parseInt((String) value)) % _numPartitions); Review comment: Yeah, done. Also added tests. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org