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



##########
File path: 
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/creator/RangeIndexCreatorTest.java
##########
@@ -106,23 +109,22 @@ private void testDataType(DataType dataType)
       throws IOException {
     FieldSpec fieldSpec = new DimensionFieldSpec(COLUMN_NAME, dataType, true);
     int numDocs = 1000;
-    Number[] values = new Number[numDocs];
+    Object values = valuesArray(dataType, numDocs);
 
+    int numValuesPerRange;
     try (RangeIndexCreator creator = new RangeIndexCreator(INDEX_DIR, 
fieldSpec, dataType, -1, -1, numDocs, numDocs)) {
       addDataToIndexer(dataType, numDocs, 1, creator, values);
       creator.seal();
+      // account for off by one bug in v1 implementation
+      numValuesPerRange = creator.getNumValuesPerRange() + 1;

Review comment:
       The current implementation reports 50 values per bucket but assigns 51 
values to the first 19 buckets and 31 to the last one.




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