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 2020/04/29 23:37:43 UTC

[GitHub] [druid] clintropolis opened a new pull request #9797: remove UnionMergeRule rules from SQL planner

clintropolis opened a new pull request #9797:
URL: https://github.com/apache/druid/pull/9797


   ### Description
   This PR optimizes planning time by removing the `UnionMergeRule` instances from the SQL planner, which didn't provide much benefit in exchange for the amount that they exploded the planning space when a lot of unions were involved. Using the added benchmark as an example of the difference this change makes:
   
   before:
   ```
   Benchmark             (query)  (rowsPerSegment)  (vectorize)  Mode  Cnt     Score     Error  Units
   SqlBenchmark.planSql        0               100        false  avgt   15     0.866 ±   0.064  ms/op
   SqlBenchmark.planSql       19               100        false  avgt   15  4189.030 ± 186.932  ms/op
   ```
   <img width="1286" alt="Screen Shot 2020-04-28 at 3 19 05 AM" src="https://user-images.githubusercontent.com/1577461/80656978-48f3e800-8a37-11ea-80b0-7f81201c5d05.png">
   
   
   after:
   ```
   Benchmark             (query)  (rowsPerSegment)  (vectorize)  Mode  Cnt    Score    Error  Units
   SqlBenchmark.planSql        0               100        false  avgt   15    0.855 ±  0.068  ms/op
   SqlBenchmark.planSql       19               100        false  avgt   15  278.250 ± 36.257  ms/op
   ```
   
   <img width="1292" alt="Screen Shot 2020-04-29 at 2 34 48 PM" src="https://user-images.githubusercontent.com/1577461/80656993-514c2300-8a37-11ea-8590-6b159c88f060.png">
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] been tested in a test Druid cluster.
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `Rules`
   


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