jihoonson commented on a change in pull request #5857: Optimize filtered aggs
with interval filters in per-segment queries
URL: https://github.com/apache/incubator-druid/pull/5857#discussion_r206304373
##########
File path:
processing/src/main/java/io/druid/query/aggregation/FilteredAggregatorFactory.java
##########
@@ -140,6 +144,61 @@ public int getMaxIntermediateSize()
return delegate.getMaxIntermediateSize();
}
+ @Override
+ public AggregatorFactory
optimizeForSegment(PerSegmentQueryOptimizationContext optimizationContext)
+ {
+ if (filter instanceof IntervalDimFilter) {
Review comment:
It looks that this optimization would work only when there is a single
`IntervalDimFilter` here. But, probably there would be more complicated filter
using `AndDimFilter` or `OrDimFilter`. To support that, we need to check all
filters. What do you think about adding a new interface like
`optimizeForSegment` to `DimFilter`? Probably we also need to use the visitor
pattern to fully optimize this.
I'm not sure this should be a part of this PR. If you think it's not, would
you please raise an issue about this and add a link here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]