public interface Filter
getBitmapIndex(io.druid.query.filter.BitmapIndexSelector) and getBitmapResult(io.druid.query.filter.BitmapIndexSelector, io.druid.query.BitmapResultFactory<T>) methods both have default implementations, delegating to each
other. Every implementation of Filter should override getBitmapResult(io.druid.query.filter.BitmapIndexSelector, io.druid.query.BitmapResultFactory<T>), currently it has a default
implementation for compatibility with Filters in extensions. In Druid 0.11 getBitmapResult(io.druid.query.filter.BitmapIndexSelector, io.druid.query.BitmapResultFactory<T>) is going to
become an abstract method without a default implementation.| Modifier and Type | Method and Description |
|---|---|
double |
estimateSelectivity(BitmapIndexSelector indexSelector)
Estimate selectivity of this filter.
|
default ImmutableBitmap |
getBitmapIndex(BitmapIndexSelector selector)
Get a bitmap index, indicating rows that match this filter.
|
default <T> T |
getBitmapResult(BitmapIndexSelector selector,
BitmapResultFactory<T> bitmapResultFactory) |
ValueMatcher |
makeMatcher(ColumnSelectorFactory factory)
Get a ValueMatcher that applies this filter to row values.
|
boolean |
supportsBitmapIndex(BitmapIndexSelector selector)
Indicates whether this filter can return a bitmap index for filtering, based on
the information provided by the input BitmapIndexSelector.
|
boolean |
supportsSelectivityEstimation(ColumnSelector columnSelector,
BitmapIndexSelector indexSelector)
Indicates whether this filter supports selectivity estimation.
|
default ImmutableBitmap getBitmapIndex(BitmapIndexSelector selector)
selector - Object used to retrieve bitmap indexesestimateSelectivity(BitmapIndexSelector)default <T> T getBitmapResult(BitmapIndexSelector selector, BitmapResultFactory<T> bitmapResultFactory)
double estimateSelectivity(BitmapIndexSelector indexSelector)
AutoStrategy.
To avoid significant performance degradation for calculating the exact cost,
implementation of this method targets to achieve rapid selectivity estimation
with reasonable sacrifice of the accuracy.
As a result, the estimated selectivity might be different from the exact value.indexSelector - Object used to retrieve bitmap indexesgetBitmapIndex(BitmapIndexSelector)ValueMatcher makeMatcher(ColumnSelectorFactory factory)
factory - Object used to create ValueMatchersboolean supportsBitmapIndex(BitmapIndexSelector selector)
selector - Object used to retrieve bitmap indexesboolean supportsSelectivityEstimation(ColumnSelector columnSelector, BitmapIndexSelector indexSelector)
columnSelector - Object to check the dimension has multi values.indexSelector - Object used to retrieve bitmap indexesCopyright © 2011–2017. All rights reserved.