Package org.apache.druid.query.filter
Class FilterTuning
- java.lang.Object
-
- org.apache.druid.query.filter.FilterTuning
-
@SubclassesMustOverrideEqualsAndHashCode public class FilterTuning extends Object
This class provides a mechanism to influence whether or not indexes are used for aFilter
during processing byFilterAnalysis.analyzeFilter(org.apache.druid.query.filter.Filter, org.apache.druid.segment.ColumnSelectorColumnIndexSelector, org.apache.druid.query.QueryMetrics, int)
(i.e. will aFilter
be a "pre" filter in which we union indexes for all values that match the filter to create aBitmapOffset
/BitmapVectorOffset
, or will it be used as a "post" filter and evaluated while scanning row values from theFilteredOffset
/FilteredVectorOffset
. This is currently only manually supplied by the user by adding to aDimFilter
which will pass through to theFilter
implementation. The main purpose at this time is to facilitate experimentation so that someday we can haveFilter
implementations intelligently, automatically use sensible defaults based on things like cardinality and who yet knows what additional information. It can also be used for advanced users to manually control which filters will be "pre" and "post" filters as described above to allow skipping indexes in known cases where filters are expensive (mostly high cardinality columns with expensive filters). As such, it is currently undocumented in user facing documentation on purpose, but whatever this turns into once more automatic usage of this is in place, should be documented in a future release.
-
-
Constructor Summary
Constructors Constructor Description FilterTuning(Boolean useBitmapIndex, Integer minCardinalityToUseBitmapIndex, Integer maxCardinalityToUseBitmapIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Integer
getMaxCardinalityToUseBitmapIndex()
Integer
getMinCardinalityToUseBitmapIndex()
boolean
getUseBitmapIndex()
int
hashCode()
boolean
hasValueCardinalityThreshold()
String
toString()
-