Package org.apache.druid.query.filter
Interface SegmentPruner
- All Known Implementing Classes:
CompositeSegmentPruner,FilterSegmentPruner
public interface SegmentPruner
-
Method Summary
Modifier and TypeMethodDescriptioncombine(SegmentPruner other) booleaninclude(DataSegment segment) Check if aDataSegmentshould be included or not.default <T> Collection<T>prune(Iterable<T> input, Function<T, DataSegment> converter) Filter the givenIterableof objects containing aDataSegment(obtained from the converter function), to reduce the overall working set which need to be processed.
-
Method Details
-
include
Check if aDataSegmentshould be included or not. If this method returns false, the segment can be skipped during processing. -
prune
Filter the givenIterableof objects containing aDataSegment(obtained from the converter function), to reduce the overall working set which need to be processed.- Type Parameters:
T- This can be any type, as long as transform function is provided to extract aDataSegment- Parameters:
input- The iterable of objects to be filteredconverter- The function to convert T toDataSegmenttoinclude(DataSegment)- Returns:
- The set of pruned object, in the same order as input
-
combine
- 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
-