zhuwenzhuang opened a new pull request, #4795:
URL: https://github.com/apache/calcite/pull/4795

   Fire rule cache prevents fire same Rule on same RelNode list to reduce 
HepPlanner's latency.
   If this cache enabled, every match order can benefit from less fire rules.
   
   Test result:
   
   `  @Test void testRuleApplyCount() {
       long applyTimes = checkRuleApplyCount(HepMatchOrder.ARBITRARY, false); 
// disable fireRuleCache
       assertThat(applyTimes, is(316L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.DEPTH_FIRST, false);
       assertThat(applyTimes, is(87L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.TOP_DOWN, false);
       assertThat(applyTimes, is(295L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.BOTTOM_UP, false);
       assertThat(applyTimes, is(296L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.ARBITRARY, true);  // 
enable fireRuleCache
       assertThat(applyTimes, is(65L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.DEPTH_FIRST, true);
       assertThat(applyTimes, is(65L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.TOP_DOWN, true);
       assertThat(applyTimes, is(65L));
   
       applyTimes = checkRuleApplyCount(HepMatchOrder.BOTTOM_UP, true);
       assertThat(applyTimes, is(65L));
     }`


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

To unsubscribe, e-mail: [email protected]

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

Reply via email to