Package org.apache.druid.query.filter
Class AbstractOptimizableDimFilter
- java.lang.Object
-
- org.apache.druid.query.filter.AbstractOptimizableDimFilter
-
- Direct Known Subclasses:
AndDimFilter
,BoundDimFilter
,ColumnComparisonDimFilter
,EqualityFilter
,ExpressionDimFilter
,ExtractionDimFilter
,FalseDimFilter
,InDimFilter
,IntervalDimFilter
,IsBooleanDimFilter
,JavaScriptDimFilter
,LikeDimFilter
,NotDimFilter
,NullFilter
,OrDimFilter
,RangeFilter
,RegexDimFilter
,SearchQueryDimFilter
,SelectorDimFilter
,SpatialDimFilter
,TrueDimFilter
public abstract class AbstractOptimizableDimFilter extends Object implements DimFilter
Base class for DimFilters that support optimization. This abstract class provides a default implementation of toOptimizedFilter that relies on the existing optimize() and toFilter() methods. It uses a memoized supplier.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.query.filter.DimFilter
DimFilter.DimFilterToStringBuilder
-
-
Constructor Summary
Constructors Constructor Description AbstractOptimizableDimFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filter
toOptimizedFilter()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.java.util.common.Cacheable
getCacheKey
-
Methods inherited from interface org.apache.druid.query.filter.DimFilter
getDimensionRangeSet, getRequiredColumns, optimize, toFilter
-
-
-
-
Method Detail
-
toOptimizedFilter
public Filter toOptimizedFilter()
- Specified by:
toOptimizedFilter
in interfaceDimFilter
- Returns:
- Return a Filter that implements this DimFilter, after applying optimizations to this DimFilter.
A typical implementation will return the result of `optimize().toFilter()`
See abstract base class
AbstractOptimizableDimFilter
for a common implementation shared by current DimFilters. The Filter returned by this method across multiple calls must be the same object: parts of the query stack compare Filters, and returning the same object allows these checks to avoid deep comparisons. (seefor an example
-
-