gianm commented on pull request #10758:
URL: https://github.com/apache/druid/pull/10758#issuecomment-759867448


   > This patch moves filter simplification logic from "optimize" to
   > "toFilter", because that allows the code to be shared with Filters.and
   > and Filters.or. The simplification has become more complicated and so
   > it's useful to share it.
   
   Note on this part: in theory, there is a performance risk here, since if 
`toFilter()` is called more often than `optimize()`, it means we'd do the 
simplification work more often. As far as I can tell, this isn't a big risk, 
since calls to `toFilter()` are generally either going through 
AbstractOptimizableDimFilter.toOptimizedFilter (which are cached) or are 
happening in places that are once per query, not once per segment (like 
FilteredAggregatorFactory's constructor).
   
   Doing the above analysis made me feel like collapsing DimFilter and Filter 
would be a good idea.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to