maedhroz commented on code in PR #2540:
URL: https://github.com/apache/cassandra/pull/2540#discussion_r1283590268
##########
test/unit/org/apache/cassandra/index/sai/disk/v1/bitpack/NumericValuesTest.java:
##########
@@ -106,11 +106,11 @@ private void writeTokens(boolean monotonic,
IndexDescriptor indexDescriptor, lon
long current = 0;
try (MetadataWriter metadataWriter = new
MetadataWriter(indexDescriptor.openPerSSTableOutput(IndexComponent.GROUP_META));
- final NumericValuesWriter numericWriter = new
NumericValuesWriter(indexDescriptor,
-
IndexComponent.TOKEN_VALUES,
-
metadataWriter,
-
monotonic,
-
blockSize))
+ final NumericValuesWriter numericWriter =
NumericValuesWriter.create(indexDescriptor,
+
IndexComponent.TOKEN_VALUES,
+
metadataWriter,
+
monotonic,
+
blockSize))
Review Comment:
One thing I noticed here...
Above in `doTest()`, we have this:
```
writeTokens(monotonic, indexDescriptor, array, prev -> monotonic ? prev +
nextInt(100) : nextInt(100));
```
In the monotonic case, this is probably fine, but otherwise, I wonder if it
would be more appropriate to generate random longs rather than random ints.
(i.e. Are there any cases we're missing using just int?)
--
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]