Package org.apache.calcite.plan
Class RuleEventLogger
java.lang.Object
org.apache.calcite.plan.RuleEventLogger
- All Implemented Interfaces:
EventListener,RelOptListener
Listener for logging useful debugging information on certain rule events.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.plan.RelOptListener
RelOptListener.RelChosenEvent, RelOptListener.RelDiscardedEvent, RelOptListener.RelEquivalenceEvent, RelOptListener.RelEvent, RelOptListener.RuleAttemptedEvent, RelOptListener.RuleEvent, RelOptListener.RuleProductionEvent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies this listener that a relational expression has been chosen as part of the final implementation of the query plan.voidNotifies this listener that a relational expression is no longer of interest to the planner.voidNotifies this listener that a relational expression has been registered with a particular equivalence class after an equivalence has been either detected or asserted.voidNotifies this listener that an optimizer rule is being applied to a particular relational expression.voidNotifies this listener that an optimizer rule has been successfully applied to a particular relational expression, resulting in a new equivalent expression (relEquivalenceFound will also be called unless the new expression is identical to an existing one).
-
Constructor Details
-
RuleEventLogger
public RuleEventLogger()
-
-
Method Details
-
relEquivalenceFound
Description copied from interface:RelOptListenerNotifies this listener that a relational expression has been registered with a particular equivalence class after an equivalence has been either detected or asserted. Equivalence classes may be either logical (all expressions which yield the same result set) or physical (all expressions which yield the same result set with a particular calling convention).- Specified by:
relEquivalenceFoundin interfaceRelOptListener- Parameters:
event- details about the event
-
ruleAttempted
Description copied from interface:RelOptListenerNotifies this listener that an optimizer rule is being applied to a particular relational expression. This rule is called twice; once before the rule is invoked, and once after. Note that the rel attribute of the event is always the old expression.- Specified by:
ruleAttemptedin interfaceRelOptListener- Parameters:
event- details about the event
-
ruleProductionSucceeded
Description copied from interface:RelOptListenerNotifies this listener that an optimizer rule has been successfully applied to a particular relational expression, resulting in a new equivalent expression (relEquivalenceFound will also be called unless the new expression is identical to an existing one). This rule is called twice; once before registration of the new rel, and once after. Note that the rel attribute of the event is always the new expression; to get the old expression, use event.getRuleCall().rels[0].- Specified by:
ruleProductionSucceededin interfaceRelOptListener- Parameters:
event- details about the event
-
relDiscarded
Description copied from interface:RelOptListenerNotifies this listener that a relational expression is no longer of interest to the planner.- Specified by:
relDiscardedin interfaceRelOptListener- Parameters:
event- details about the event
-
relChosen
Description copied from interface:RelOptListenerNotifies this listener that a relational expression has been chosen as part of the final implementation of the query plan. After the plan is complete, this is called one more time with null for the rel.- Specified by:
relChosenin interfaceRelOptListener- Parameters:
event- details about the event
-