mirror of https://github.com/apache/druid.git
Make Filter.getBitmapResult() abstract (#4481)
This commit is contained in:
parent
6d2df2a542
commit
ad76f7a1ab
|
@ -25,12 +25,6 @@ import io.druid.query.DefaultBitmapResultFactory;
|
|||
import io.druid.segment.ColumnSelector;
|
||||
import io.druid.segment.ColumnSelectorFactory;
|
||||
|
||||
/**
|
||||
* {@link #getBitmapIndex} and {@link #getBitmapResult} methods both have default implementations, delegating to each
|
||||
* other. Every implementation of {@link Filter} should override {@link #getBitmapResult}, currently it has a default
|
||||
* implementation for compatibility with Filters in extensions. In Druid 0.11 {@link #getBitmapResult} is going to
|
||||
* become an abstract method without a default implementation.
|
||||
*/
|
||||
public interface Filter
|
||||
{
|
||||
/**
|
||||
|
@ -38,6 +32,8 @@ public interface Filter
|
|||
* {@link #supportsBitmapIndex(BitmapIndexSelector)} returns true. Behavior in the case that
|
||||
* {@link #supportsBitmapIndex(BitmapIndexSelector)} returns false is undefined.
|
||||
*
|
||||
* This method is OK to be called, but generally should not be overridden, override {@link #getBitmapResult} instead.
|
||||
*
|
||||
* @param selector Object used to retrieve bitmap indexes
|
||||
*
|
||||
* @return A bitmap indicating rows that match this filter.
|
||||
|
@ -60,10 +56,7 @@ public interface Filter
|
|||
*
|
||||
* @see Filter#estimateSelectivity(BitmapIndexSelector)
|
||||
*/
|
||||
default <T> T getBitmapResult(BitmapIndexSelector selector, BitmapResultFactory<T> bitmapResultFactory)
|
||||
{
|
||||
return bitmapResultFactory.wrapUnknown(getBitmapIndex(selector));
|
||||
}
|
||||
<T> T getBitmapResult(BitmapIndexSelector selector, BitmapResultFactory<T> bitmapResultFactory);
|
||||
|
||||
/**
|
||||
* Estimate selectivity of this filter.
|
||||
|
|
Loading…
Reference in New Issue