Package org.apache.druid.query.filter
Class FilterSegmentPruner
java.lang.Object
org.apache.druid.query.filter.FilterSegmentPruner
- All Implemented Interfaces:
SegmentPruner
Uses a
DimFilter to check the DimFilter.getDimensionRangeSet(String) against
ShardSpec.possibleInDomain(Map) in order to 'prune' a set of segments whose rows would never match a filter
and avoid processing those segments in the first place.-
Constructor Summary
ConstructorsConstructorDescriptionFilterSegmentPruner(DimFilter filter, Set<String> filterFields, VirtualColumns virtualColumns) -
Method Summary
Modifier and TypeMethodDescriptioncombine(SegmentPruner other) booleaninthashCode()booleaninclude(DataSegment segment) Returns false if theDataSegmentdoes not fit inDimFilter.getDimensionRangeSet(String).toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.query.filter.SegmentPruner
prune
-
Constructor Details
-
FilterSegmentPruner
public FilterSegmentPruner(DimFilter filter, @Nullable Set<String> filterFields, @Nullable VirtualColumns virtualColumns)
-
-
Method Details
-
include
Returns false if theDataSegmentdoes not fit inDimFilter.getDimensionRangeSet(String).rangeCachestores the RangeSets of different dimensions for the filter, so it can be re-used between calls to save redundant evaluation ofDimFilter.getDimensionRangeSet(String)on the same columns.- Specified by:
includein interfaceSegmentPruner
-
combine
- Specified by:
combinein interfaceSegmentPruner- Returns:
- combined
SegmentPruner, which if both are of the same type may be merged into a new pruner of the same type that contains the information of both, or if not directly combinable, implementors should create aCompositeSegmentPruner
-
equals
-
hashCode
public int hashCode() -
toString
-