You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2020/08/11 01:03:57 UTC
[hive] branch master updated: HIVE-23997: Some logs in
ConstantPropagateProcFactory are not straightforward (Zhihua Deng,
reviewed by Jesus Camacho Rodriguez)
This is an automated email from the ASF dual-hosted git repository.
jcamacho 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 17ee33f HIVE-23997: Some logs in ConstantPropagateProcFactory are not straightforward (Zhihua Deng, reviewed by Jesus Camacho Rodriguez)
17ee33f is described below
commit 17ee33f4f4d8dc9437d1d3a47663a635d2e47b58
Author: dengzh <de...@gmail.com>
AuthorDate: Tue Aug 11 09:03:31 2020 +0800
HIVE-23997: Some logs in ConstantPropagateProcFactory are not straightforward (Zhihua Deng, reviewed by Jesus Camacho Rodriguez)
Closes apache/hive#1364
---
.../ql/optimizer/ConstantPropagateProcFactory.java | 18 +++++++++++-------
.../org/apache/hadoop/hive/ql/ppd/OpProcFactory.java | 3 ++-
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
index f43ba92..b071a97 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
@@ -544,7 +544,8 @@ public final class ConstantPropagateProcFactory {
ColumnInfo ci = resolveColumn(rs, c);
if (ci != null) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Filter " + udf + " is identified as a value assignment, propagate it.");
+ LOG.debug("Filter {} is identified as a value assignment, propagate it.",
+ udf.getDisplayString(new String[]{lOperand.getExprString(), rOperand.getExprString()}));
}
if (!v.getTypeInfo().equals(ci.getType())) {
v = typeCast(v, ci.getType(), true);
@@ -557,7 +558,8 @@ public final class ConstantPropagateProcFactory {
ExprNodeDesc operand = newExprs.get(0);
if (operand instanceof ExprNodeColumnDesc) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Filter " + udf + " is identified as a value assignment, propagate it.");
+ LOG.debug("Filter {} is identified as a value assignment, propagate it.",
+ udf.getDisplayString(new String[]{operand.getExprString()}));
}
ExprNodeColumnDesc c = (ExprNodeColumnDesc) operand;
ColumnInfo ci = resolveColumn(rs, c);
@@ -979,8 +981,8 @@ public final class ConstantPropagateProcFactory {
ObjectInspectorUtils.copyToStandardJavaObject(o, coi));
} else if (!PrimitiveObjectInspectorUtils.isPrimitiveJavaClass(clz)) {
if (LOG.isErrorEnabled()) {
- LOG.error("Unable to evaluate " + udf
- + ". Return value unrecoginizable.");
+ LOG.error("Unable to evaluate {}({}). Return value unrecoginizable.",
+ udf.getClass().getName(), exprs);
}
return null;
} else {
@@ -993,8 +995,8 @@ public final class ConstantPropagateProcFactory {
}
return new ExprNodeConstantDesc(o).setFoldedFromVal(constStr);
} catch (HiveException e) {
- LOG.error("Evaluation function " + udf.getClass()
- + " failed in Constant Propagation Optimizer.");
+ LOG.error("Evaluation function {}({}) failed in Constant Propagation Optimizer.",
+ udf.getClass().getName(), exprs);
throw new RuntimeException(e);
}
}
@@ -1458,7 +1460,9 @@ public final class ConstantPropagateProcFactory {
ndRecursive = ndRecursive.getChildren().get(0);
}
if (ndRecursive.getChildren().get(0) instanceof ReduceSinkOperator) {
- LOG.debug("Skip JOIN-FIL(*)-RS structure.");
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Skip JOIN-FIL(*)-RS structure.");
+ }
return null;
}
}
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
index 56d3e90..8250900 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
@@ -785,7 +785,8 @@ public final class OpProcFactory {
exprs.addAll(finalCandidates);
}
}
-
+
+ logExpr(nd, prunedPred);
if (!nonFinalCandidates.isEmpty()) {
createFilter((Operator) nd, nonFinalCandidates, owi);
}