xndai commented on issue #1543: [CALCITE-3455] Redundant rule firing for both 
logical and physical nodes
URL: https://github.com/apache/calcite/pull/1543#issuecomment-561483689
 
 
   > I have a question related to CALCITE-3455 but not necessarily related to 
this PR:
   > How about providing an approach for RelOptRule and allow to specify that 
rels matched should have the same convention (without specifying what that 
convention should be) ? IMHO we can also save a lot of redundant fires by this 
way and I think lots of existing rules can work well with this fashion.
   
   I agree in general this is the right direction. Not only the rule should 
allow specific convention for matching, but also able to create new rels with 
given conventions. For example, today when we fire ProjectMerge, it will 
generate another LogicalProject even if two EmmuerableProjects are merged. This 
doesn't make sense. But in order to do that we should provide a way to register 
RelFactory into the framework for custom convention. This mechanism is also 
needed by CALCITE-2970.
   
   Having said that, for short term / mid term I feel we can alleviate the 
problem by restricting certain rules to only match logic nodes, which is what 
this PR intends to do.

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


With regards,
Apache Git Services

Reply via email to