gianm commented on a change in pull request #9731:
URL: https://github.com/apache/druid/pull/9731#discussion_r435648576
##########
File path:
processing/src/main/java/org/apache/druid/segment/ColumnSelectorBitmapIndexSelector.java
##########
@@ -157,14 +158,16 @@ public void close() throws IOException
}
@Override
- public boolean hasMultipleValues(final String dimension)
+ public ColumnCapabilities.Capable hasMultipleValues(final String dimension)
{
if (isVirtualColumn(dimension)) {
return
virtualColumns.getVirtualColumn(dimension).capabilities(dimension).hasMultipleValues();
}
final ColumnHolder columnHolder = index.getColumnHolder(dimension);
- return columnHolder != null &&
columnHolder.getCapabilities().hasMultipleValues();
+ return columnHolder != null
+ ? columnHolder.getCapabilities().hasMultipleValues()
+ : ColumnCapabilities.Capable.UNKNOWN;
Review comment:
If the column holder is `null` then we should be able to safely return
`Capable.TRUE`, because `getBitmapIndex` will return a bitmap index as if the
column were full of nulls. This will enable optimizations in ExpressionFilter
when the expression is based on a nonexistent column.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]