clintropolis commented on code in PR #16039:
URL: https://github.com/apache/druid/pull/16039#discussion_r1533200679
##########
processing/src/main/java/org/apache/druid/segment/nested/ScalarDoubleColumnAndIndexSupplier.java:
##########
@@ -258,6 +265,70 @@ public <T> T computeBitmapResult(BitmapResultFactory<T>
bitmapResultFactory, boo
}
}
+ private final class DoubleValueSetIndexes implements ValueSetIndexes
+ {
+ final FixedIndexed<Double> dictionary = doubleDictionarySupplier.get();
+
+ @Nullable
+ @Override
+ public BitmapColumnIndex forSortedValues(@Nonnull List<?> sortedValues,
TypeSignature<ValueType> matchValueType)
+ {
+ final boolean matchNull = sortedValues.get(0) == null;
+ final Supplier<ImmutableBitmap> unknownsIndex = () -> {
+ if (!matchNull && dictionary.get(0) == null) {
+ return valueIndexes.get(0);
+ }
+ return null;
+ };
+
+ // values are doubles and ordered in double order
+ if (matchValueType.is(ValueType.DOUBLE)) {
Review Comment:
i guess the downside to doing this is that i was hoping at some point to
specialize the value dictionaries for primitive values (e.g. #12846) and
combining them would make that not very easy since would need a generic
parameter instead of java primitive.
--
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]