Package org.apache.druid.query.filter
Interface BooleanFilter
-
-
Field Summary
Fields Modifier and Type Field Description static ValueMatcher[]
EMPTY_VALUE_MATCHER_ARRAY
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LinkedHashSet<Filter>
getFilters()
Returns the child filters for this filter.default Set<String>
getRequiredColumns()
Set of columns used by a filter.ValueMatcher
makeMatcher(ColumnIndexSelector selector, ColumnSelectorFactory columnSelectorFactory, RowOffsetMatcherFactory rowOffsetMatcherFactory)
Get a ValueMatcher that applies this filter to row values.default boolean
supportsSelectivityEstimation(ColumnSelector columnSelector, ColumnIndexSelector indexSelector)
Indicates whether this filter supports selectivity estimation.-
Methods inherited from interface org.apache.druid.query.filter.Filter
canVectorizeMatcher, estimateSelectivity, getBitmapColumnIndex, makeMatcher, makeVectorMatcher, rewriteRequiredColumns, supportsRequiredColumnRewrite
-
-
-
-
Field Detail
-
EMPTY_VALUE_MATCHER_ARRAY
static final ValueMatcher[] EMPTY_VALUE_MATCHER_ARRAY
-
-
Method Detail
-
getFilters
LinkedHashSet<Filter> getFilters()
Returns the child filters for this filter. This is a LinkedHashSet because we don't want duplicates, but the order is also important in some cases (such as when filters are provided in an order that encourages short-circuiting.)
-
makeMatcher
ValueMatcher makeMatcher(ColumnIndexSelector selector, ColumnSelectorFactory columnSelectorFactory, RowOffsetMatcherFactory rowOffsetMatcherFactory)
Get a ValueMatcher that applies this filter to row values. Unlike makeMatcher(ValueMatcherFactory), this method allows the Filter to utilize bitmap indexes. An implementation should either: - return a ValueMatcher that checks row values, using the provided ValueMatcherFactory - or, if possible, get a bitmap index for this filter using the ColumnIndexSelector, and return a ValueMatcher that checks the current row offset, created using the bitmap index.- Parameters:
selector
- Object used to retrieve bitmap indexescolumnSelectorFactory
- Object used to select columns for making ValueMatchersrowOffsetMatcherFactory
- Object used to create RowOffsetMatchers- Returns:
- ValueMatcher that applies this filter
-
getRequiredColumns
default Set<String> getRequiredColumns()
Description copied from interface:Filter
Set of columns used by a filter.- Specified by:
getRequiredColumns
in interfaceFilter
-
supportsSelectivityEstimation
default boolean supportsSelectivityEstimation(ColumnSelector columnSelector, ColumnIndexSelector indexSelector)
Description copied from interface:Filter
Indicates whether this filter supports selectivity estimation. A filter supports selectivity estimation if it supports bitmap index and the dimension which the filter evaluates does not have multi values.- Specified by:
supportsSelectivityEstimation
in interfaceFilter
- Parameters:
columnSelector
- Object to check the dimension has multi values.indexSelector
- Object used to retrieve bitmap indexes- Returns:
- true if this Filter supports selectivity estimation, false otherwise.
-
-