gianm 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_r343316892
##########
File path:
processing/src/main/java/org/apache/druid/segment/data/ColumnarDoubles.java
##########
@@ -94,10 +95,20 @@ public void inspectRuntimeShape(RuntimeShapeInspector
inspector)
} else {
class HistoricalDoubleColumnSelectorWithNulls implements
DoubleColumnSelector, HistoricalColumnSelector<Double>
{
+ private final PeekableIntIterator nullIterator =
nullValueBitmap.peekableIterator();
+ private int nullMark = -1;
+
@Override
public boolean isNull()
{
- return nullValueBitmap.get(offset.getOffset());
+ final int i = offset.getOffset();
+ if (nullMark < i) {
Review comment:
If someone calls `offset.reset()` (topN does this sometimes) then this will
be wrong. I think you need some logic to detect the offset going backwards, and
resetting the iterator in that case.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]