Package org.apache.druid.segment.filter
Class JavaScriptFilter
- java.lang.Object
-
- org.apache.druid.segment.filter.JavaScriptFilter
-
-
Constructor Summary
Constructors Constructor Description JavaScriptFilter(String dimension, JavaScriptDimFilter.JavaScriptPredicateFactory predicate, FilterTuning filterTuning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
BitmapColumnIndex
getBitmapColumnIndex(ColumnIndexSelector selector)
Returns aBitmapColumnIndex
if this filter supports using a bitmap index for filtering for the given inputColumnIndexSelector
.Set<String>
getRequiredColumns()
Set of columns used by a filter.int
hashCode()
ValueMatcher
makeMatcher(ColumnSelectorFactory factory)
Get aValueMatcher
that applies this filter to row values.boolean
supportsSelectivityEstimation(ColumnSelector columnSelector, ColumnIndexSelector indexSelector)
Indicates whether this filter supports selectivity estimation.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.filter.Filter
canVectorizeMatcher, estimateSelectivity, makeVectorMatcher, rewriteRequiredColumns, supportsRequiredColumnRewrite
-
-
-
-
Constructor Detail
-
JavaScriptFilter
public JavaScriptFilter(String dimension, JavaScriptDimFilter.JavaScriptPredicateFactory predicate, FilterTuning filterTuning)
-
-
Method Detail
-
getBitmapColumnIndex
@Nullable public BitmapColumnIndex getBitmapColumnIndex(ColumnIndexSelector selector)
Description copied from interface:Filter
Returns aBitmapColumnIndex
if this filter supports using a bitmap index for filtering for the given inputColumnIndexSelector
. TheBitmapColumnIndex
can be used to compute into a bitmap indicating rows that match this filter resultBitmapColumnIndex.computeBitmapResult(BitmapResultFactory, boolean)
, or examine details about the index prior to computing it, viaBitmapColumnIndex.getIndexCapabilities()
.- Specified by:
getBitmapColumnIndex
in interfaceFilter
- Parameters:
selector
- Object used to create BitmapColumnIndex- Returns:
- BitmapColumnIndex that can build ImmutableBitmap of matched row numbers
-
makeMatcher
public ValueMatcher makeMatcher(ColumnSelectorFactory factory)
Description copied from interface:Filter
Get aValueMatcher
that applies this filter to row values.- Specified by:
makeMatcher
in interfaceFilter
- Parameters:
factory
- Object used to create ValueMatchers- Returns:
- ValueMatcher that applies this filter to row values.
-
supportsSelectivityEstimation
public 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.
-
getRequiredColumns
public Set<String> getRequiredColumns()
Description copied from interface:Filter
Set of columns used by a filter.- Specified by:
getRequiredColumns
in interfaceFilter
-
-