| Modifier and Type | Field and Description |
|---|---|
static ValueMatcher[] |
EMPTY_VALUE_MATCHER_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
Set<Filter> |
getFilters() |
default Set<String> |
getRequiredColumns()
Set of columns used by a filter.
|
ValueMatcher |
makeMatcher(BitmapIndexSelector selector,
ColumnSelectorFactory columnSelectorFactory,
RowOffsetMatcherFactory rowOffsetMatcherFactory)
Get a ValueMatcher that applies this filter to row values.
|
default boolean |
shouldUseBitmapIndex(BitmapIndexSelector selector)
Determine if a filter *should* use a bitmap index based on information collected from the supplied
BitmapIndexSelector. |
default boolean |
supportsBitmapIndex(BitmapIndexSelector selector)
Indicates whether this filter can return a bitmap index for filtering, based on the information provided by the
input
BitmapIndexSelector. |
default boolean |
supportsSelectivityEstimation(ColumnSelector columnSelector,
BitmapIndexSelector indexSelector)
Indicates whether this filter supports selectivity estimation.
|
canVectorizeMatcher, estimateSelectivity, getBitmapIndex, getBitmapResult, makeMatcher, makeVectorMatcher, rewriteRequiredColumns, supportsRequiredColumnRewritestatic final ValueMatcher[] EMPTY_VALUE_MATCHER_ARRAY
ValueMatcher makeMatcher(BitmapIndexSelector selector, ColumnSelectorFactory columnSelectorFactory, RowOffsetMatcherFactory rowOffsetMatcherFactory)
selector - Object used to retrieve bitmap indexescolumnSelectorFactory - Object used to select columns for making ValueMatchersrowOffsetMatcherFactory - Object used to create RowOffsetMatchersdefault Set<String> getRequiredColumns()
FilterFilter.supportsBitmapIndex(org.apache.druid.query.filter.BitmapIndexSelector) returns true, all columns returned by this method
can be expected to have a bitmap index retrievable via BitmapIndexSelector.getBitmapIndex(String)getRequiredColumns in interface Filterdefault boolean supportsBitmapIndex(BitmapIndexSelector selector)
FilterBitmapIndexSelector.
Returning a value of true here guarantees that Filter.getBitmapIndex(BitmapIndexSelector) will return a non-null
BitmapIndexSelector, and also that all columns specified in Filter.getRequiredColumns() have a bitmap
index retrievable via BitmapIndexSelector.getBitmapIndex(String).supportsBitmapIndex in interface Filterselector - Object used to retrieve bitmap indexesdefault boolean shouldUseBitmapIndex(BitmapIndexSelector selector)
FilterBitmapIndexSelector. This method differs from Filter.supportsBitmapIndex(BitmapIndexSelector) in that
the former only indicates if a bitmap index is available and Filter.getBitmapIndex(BitmapIndexSelector) may be
used.
If shouldUseFilter(selector) returns true, Filter.supportsBitmapIndex(org.apache.druid.query.filter.BitmapIndexSelector) must also return true when called with the
same selector object. Returning a value of true here guarantees that Filter.getBitmapIndex(BitmapIndexSelector)
will return a non-null BitmapIndexSelector, and also that all columns specified in
Filter.getRequiredColumns() have a bitmap index retrievable via
BitmapIndexSelector.getBitmapIndex(String).
Implementations of this methods typically consider a FilterTuning to make decisions about when to
use an available index. A "standard" implementation of this is available to all Filter implementations in
Filters.shouldUseBitmapIndex(Filter, BitmapIndexSelector, FilterTuning).shouldUseBitmapIndex in interface Filterselector - Object used to retrieve bitmap indexes and provide information about the columndefault boolean supportsSelectivityEstimation(ColumnSelector columnSelector, BitmapIndexSelector indexSelector)
FiltersupportsSelectivityEstimation in interface FiltercolumnSelector - Object to check the dimension has multi values.indexSelector - Object used to retrieve bitmap indexesCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.