You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/12/10 00:45:51 UTC

[GitHub] [incubator-pinot] siddharthteotia opened a new issue #4904: Use FilterQuery instead of FilterQueryTree in query optimizer.

siddharthteotia opened a new issue #4904: Use FilterQuery instead of FilterQueryTree in query optimizer.
URL: https://github.com/apache/incubator-pinot/issues/4904
 
 
   When we build the BrokerRequest from AST, for the WHERE clause we do the following:
   
   (1) Build FilterQueryTree (this is a non-serializable object)
   (2) Build FilterQuery from FilterQuery -- this is thrift compliant object and is sent to servers for execution as part of BrokerRequest.
   (3) Run Filter query optimizer
   
   On the server, we convert the received FilterQuery to FilterQueryTree and use that as a basis to construct physical filter operators.
   
   So there is essentially a conversion of FilterQueryTree -> FilterQuery on the broker and vice-versa on the server during execution.
   
   However, as part of (3) the broker converts the FilterQuery back to FilterQueryTree, runs the optimizer on latter, converts it back to FilterQuery and updates the FilterQuery in broker request. This is a needless (and twice) conversion of FilterQueryTree <=> FilterQuery on the broker itself since the optimization could have directly been done on the FiterQuery.
   
   There are currently 3 filter query tree optimizers:
   
   MultipleOrInequalitiesToInClause
   RangeMerge
   Flatten
   
   All these are invoked by BrokerRequestOptimizer. We should rewrite these to directly work on FilterQuery thrift object. Some logic can be borrowed but since working on FilterQuery is very different from working on FilterQueryTree, rewriting is best options and easy to review.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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