This is an automated email from the ASF dual-hosted git repository.
asolimando pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/master by this push:
new 864268c [CALCITE-4991] Improve RuleEventLogger to also print input
rels in FULL_PLAN mode
864268c is described below
commit 864268c600bb5bd6077092f1c6605ddd59a4969e
Author: Alessandro Solimando <[email protected]>
AuthorDate: Fri Jan 21 12:06:48 2022 +0100
[CALCITE-4991] Improve RuleEventLogger to also print input rels in
FULL_PLAN mode
---
core/src/main/java/org/apache/calcite/plan/RuleEventLogger.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/src/main/java/org/apache/calcite/plan/RuleEventLogger.java
b/core/src/main/java/org/apache/calcite/plan/RuleEventLogger.java
index 4842055..1cc4cf4 100644
--- a/core/src/main/java/org/apache/calcite/plan/RuleEventLogger.java
+++ b/core/src/main/java/org/apache/calcite/plan/RuleEventLogger.java
@@ -49,6 +49,11 @@ public class RuleEventLogger implements RelOptListener {
@Override public void ruleProductionSucceeded(RuleProductionEvent event) {
if (event.isBefore() && LOG.isDebugEnabled()) {
RelOptRuleCall call = event.getRuleCall();
+
+ Arrays.stream(call.rels).forEach(rel ->
+ LOG.debug(FULL, "call#{}: Full plan for rule input [rel#{}:{}]: {}",
call.id, rel.getId(),
+ rel.getRelTypeName(), System.lineSeparator() +
RelOptUtil.toString(rel)));
+
RelNode newRel = event.getRel();
String description =
newRel == null ? "null" : "rel#" + newRel.getId() + ":" +
newRel.getRelTypeName();