You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/01/14 01:38:38 UTC

[GitHub] [druid] gianm commented on pull request #10758: Retain order of AND, OR filter children.

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org