You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kr...@apache.org on 2022/01/24 07:51:35 UTC
[hive] branch master updated: HIVE-25888: Improve RuleEventLogger to also print input rels in FULL_PLAN mode (Alessandro Solimando, reviewed by Krisztian Kasa)
This is an automated email from the ASF dual-hosted git repository.
krisztiankasa pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new bf748a7 HIVE-25888: Improve RuleEventLogger to also print input rels in FULL_PLAN mode (Alessandro Solimando, reviewed by Krisztian Kasa)
bf748a7 is described below
commit bf748a73673152f94eee0ce461ff0487be3e6b51
Author: Alessandro Solimando <al...@gmail.com>
AuthorDate: Mon Jan 24 08:51:06 2022 +0100
HIVE-25888: Improve RuleEventLogger to also print input rels in FULL_PLAN mode (Alessandro Solimando, reviewed by Krisztian Kasa)
---
.../org/apache/hadoop/hive/ql/optimizer/calcite/RuleEventLogger.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RuleEventLogger.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RuleEventLogger.java
index f5ab294..1c4c74a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RuleEventLogger.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RuleEventLogger.java
@@ -60,6 +60,11 @@ public class RuleEventLogger implements RelOptListener {
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();
LOG.debug("call#{}: Rule [{}] produced [{}]", call.id, call.getRule(), description);