nizarhejazi commented on code in PR #8927:
URL: https://github.com/apache/pinot/pull/8927#discussion_r921819679
##########
pinot-core/src/main/java/org/apache/pinot/core/query/distinct/raw/RawDoubleSingleColumnDistinctOnlyExecutor.java:
##########
@@ -40,10 +42,15 @@ public boolean process(TransformBlock transformBlock) {
int numDocs = transformBlock.getNumDocs();
if (blockValueSet.isSingleValue()) {
double[] values = blockValueSet.getDoubleValuesSV();
+ RoaringBitmap nullBitmap = blockValueSet.getNullBitmap();
for (int i = 0; i < numDocs; i++) {
- _valueSet.add(values[i]);
- if (_valueSet.size() >= _limit) {
- return true;
+ if (nullBitmap != null && nullBitmap.contains(i)) {
+ _numNulls = 1;
+ } else {
+ _valueSet.add(values[i]);
+ if (_valueSet.size() >= _limit - _numNulls) {
+ return true;
+ }
}
}
} else {
Review Comment:
I don't handle any MV columns yet. Added TODO to address later in separate
PR.
--
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]