vinothchandar commented on a change in pull request #1466: [HUDI-742] Fix Java
Math Exception
URL: https://github.com/apache/incubator-hudi/pull/1466#discussion_r400238572
##########
File path:
hudi-client/src/main/java/org/apache/hudi/index/bloom/BucketizedBloomCheckPartitioner.java
##########
@@ -145,7 +145,7 @@ public int getPartition(Object key) {
final Pair<String, String> parts = (Pair<String, String>) key;
final long hashOfKey = NumericUtils.getMessageDigestHash("MD5",
parts.getRight());
final List<Integer> candidatePartitions =
fileGroupToPartitions.get(parts.getLeft());
- final int idx = (int) Math.floorMod(hashOfKey, candidatePartitions.size());
+ final int idx = (int) Math.floorMod((int) hashOfKey,
candidatePartitions.size());
Review comment:
is the cast to `(int)` necessary still before assigning to `idx`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services