Package org.apache.druid.segment.filter
Class RegexFilter
- java.lang.Object
-
- org.apache.druid.segment.filter.DimensionPredicateFilter
-
- org.apache.druid.segment.filter.RegexFilter
-
- All Implemented Interfaces:
Filter
public class RegexFilter extends DimensionPredicateFilter
-
-
Field Summary
-
Fields inherited from class org.apache.druid.segment.filter.DimensionPredicateFilter
basePredicateString, dimension, extractionFn, filterTuning, predicateFactory
-
-
Constructor Summary
Constructors Constructor Description RegexFilter(String dimension, Pattern pattern, ExtractionFn extractionFn, FilterTuning filterTuning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
Filter
rewriteRequiredColumns(Map<String,String> columnRewrites)
Return a copy of this filter that is identical to the this filter except that it operates on different columns, based on a renaming map where the key is the column to be renamed in the filter, and the value is the new column name.boolean
supportsRequiredColumnRewrite()
Returns true is this filter is able to return a copy of this filter that is identical to this filter except that it operates on different columns, based on a renaming map.String
toString()
-
Methods inherited from class org.apache.druid.segment.filter.DimensionPredicateFilter
canVectorizeMatcher, getBitmapColumnIndex, getRequiredColumns, makeMatcher, makeVectorMatcher, supportsSelectivityEstimation
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.filter.Filter
estimateSelectivity
-
-
-
-
Constructor Detail
-
RegexFilter
public RegexFilter(String dimension, Pattern pattern, ExtractionFn extractionFn, FilterTuning filterTuning)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classDimensionPredicateFilter
-
supportsRequiredColumnRewrite
public boolean supportsRequiredColumnRewrite()
Description copied from interface:Filter
Returns true is this filter is able to return a copy of this filter that is identical to this filter except that it operates on different columns, based on a renaming map.
-
rewriteRequiredColumns
public Filter rewriteRequiredColumns(Map<String,String> columnRewrites)
Description copied from interface:Filter
Return a copy of this filter that is identical to the this filter except that it operates on different columns, based on a renaming map where the key is the column to be renamed in the filter, and the value is the new column name. For example, if I have a filter (A = hello), and I have a renaming map (A -> B), this should return the filter (B = hello)- Parameters:
columnRewrites
- Column rewrite map- Returns:
- Copy of this filter that operates on new columns based on the rewrite map
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classDimensionPredicateFilter
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDimensionPredicateFilter
-
-