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 2019/02/12 17:52:11 UTC
[hive] branch branch-3.1 updated: HIVE-21236: SharedWorkOptimizer
should check table properties (Jesus Camacho Rodriguez,
reviewed by Ashutosh Chauhan)
This is an automated email from the ASF dual-hosted git repository.
jcamacho pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 008eda8 HIVE-21236: SharedWorkOptimizer should check table properties (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
008eda8 is described below
commit 008eda8c50cd8f8f092b676a2c756ac0162dff81
Author: Jesus Camacho Rodriguez <jc...@apache.org>
AuthorDate: Mon Feb 11 16:21:48 2019 -0800
HIVE-21236: SharedWorkOptimizer should check table properties (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
---
.../org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
index f734f79..6198316 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java
@@ -30,6 +30,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Set;
import java.util.TreeMap;
@@ -675,6 +676,10 @@ public class SharedWorkOptimizer extends Transform {
if (tsOp1.getConf().getRowLimit() != tsOp2.getConf().getRowLimit()) {
return false;
}
+ // If table properties do not match, we currently do not merge
+ if (!Objects.equals(tsOp1.getConf().getOpProps(), tsOp2.getConf().getOpProps())) {
+ return false;
+ }
// If partitions do not match, we currently do not merge
PrunedPartitionList prevTsOpPPList = pctx.getPrunedPartitions(tsOp1);
PrunedPartitionList tsOpPPList = pctx.getPrunedPartitions(tsOp2);
@@ -1087,7 +1092,8 @@ public class SharedWorkOptimizer extends Transform {
&& StringUtils.equals(op1Conf.getFilterExprString(), op2Conf.getFilterExprString())
&& pctx.getPrunedPartitions(tsOp1).getPartitions().equals(
pctx.getPrunedPartitions(tsOp2).getPartitions())
- && op1Conf.getRowLimit() == op2Conf.getRowLimit()) {
+ && op1Conf.getRowLimit() == op2Conf.getRowLimit()
+ && Objects.equals(op1Conf.getOpProps(), op2Conf.getOpProps())) {
return true;
} else {
return false;