You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2018/04/12 15:48:15 UTC

hive git commit: HIVE-19156 : TestMiniLlapLocalCliDriver.vectorized_dynamic_semijoin_reduction.q is broken (Jason Dere via Deepak Jaiswal)

Repository: hive
Updated Branches:
  refs/heads/master 2e027cff7 -> a2dd09f86


HIVE-19156 : TestMiniLlapLocalCliDriver.vectorized_dynamic_semijoin_reduction.q is broken (Jason Dere via Deepak Jaiswal)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/a2dd09f8
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/a2dd09f8
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/a2dd09f8

Branch: refs/heads/master
Commit: a2dd09f86386ca3f51eca90948d6ec1963ece982
Parents: 2e027cf
Author: Jason Dere <jd...@hortonworks.com>
Authored: Thu Apr 12 08:47:25 2018 -0700
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Thu Apr 12 08:47:25 2018 -0700

----------------------------------------------------------------------
 .../ql/exec/tez/DynamicValueRegistryTez.java     | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/a2dd09f8/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicValueRegistryTez.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicValueRegistryTez.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicValueRegistryTez.java
index ec1e84b..2d99f50 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicValueRegistryTez.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicValueRegistryTez.java
@@ -61,6 +61,11 @@ public class DynamicValueRegistryTez implements DynamicValueRegistry {
     }
   }
 
+  static class NullValue {
+  }
+
+  static final NullValue NULL_VALUE = new NullValue();
+
   protected Map<String, Object> values = new ConcurrentHashMap<>();
 
   public DynamicValueRegistryTez() {
@@ -71,11 +76,21 @@ public class DynamicValueRegistryTez implements DynamicValueRegistry {
     if (!values.containsKey(key)) {
       throw new NoDynamicValuesException("Value does not exist in registry: " + key);
     }
-    return values.get(key);
+    Object val = values.get(key);
+
+    if (val == NULL_VALUE) {
+      return null;
+    }
+    return val;
   }
 
   protected void setValue(String key, Object value) {
-    values.put(key, value);
+    if (value == null) {
+      // ConcurrentHashMap does not allow null - use a substitute value.
+      values.put(key, NULL_VALUE);
+    } else {
+      values.put(key, value);
+    }
   }
 
   @Override