clintropolis commented on a change in pull request #8822: optimize numeric 
column null value checking for low filter selectivity (more rows)
URL: https://github.com/apache/incubator-druid/pull/8822#discussion_r344364825
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/segment/data/ColumnarDoubles.java
 ##########
 @@ -168,12 +189,21 @@ private void computeVectorsIfNeeded()
         }
 
         if (offset.isContiguous()) {
+          if (offset.getStartOffset() < offsetMark) {
+            nullIterator = nullValueBitmap.peekableIterator();
+          }
+          offsetMark = offset.getStartOffset();
           ColumnarDoubles.this.get(doubleVector, offset.getStartOffset(), 
offset.getCurrentVectorSize());
         } else {
-          ColumnarDoubles.this.get(doubleVector, offset.getOffsets(), 
offset.getCurrentVectorSize());
+          final int[] offsets = offset.getOffsets();
+          if (offsets[0] < offsetMark) {
+            nullIterator = nullValueBitmap.peekableIterator();
+          }
+          offsetMark = offsets[0];
 
 Review comment:
   oops, will fix and add a test

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to