soumitra-st commented on code in PR #14267:
URL: https://github.com/apache/pinot/pull/14267#discussion_r1809537045
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/FixedBitMVForwardIndexWriter.java:
##########
@@ -76,7 +76,7 @@ public class FixedBitMVForwardIndexWriter implements
Closeable {
public FixedBitMVForwardIndexWriter(File file, int numDocs, int
totalNumValues, int numBitsPerValue)
throws IOException {
- float averageValuesPerDoc = totalNumValues / numDocs;
+ double averageValuesPerDoc = Math.max(totalNumValues / (double) numDocs,
1f);
Review Comment:
Fixing the integer division and also using max to ensure averageValuesPerDoc
is never 0!
--
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]