hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject hive git commit: HIVE-14287 : Explain output: printed nested mapvalues are dependent on map entry iteration order (Zoltan Haindrich via Ashutosh Chauhan)
Date Mon, 25 Jul 2016 21:20:13 GMT
Repository: hive
Updated Branches:
  refs/heads/master d8f28f0da -> 9f40c8fb9


HIVE-14287 : Explain output: printed nested mapvalues are dependent on map entry iteration
order (Zoltan Haindrich via Ashutosh Chauhan)

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


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

Branch: refs/heads/master
Commit: 9f40c8fb9bcf5cce44a7b496e14ba702c7fc37f9
Parents: d8f28f0
Author: Zoltan Haindrich <kirk@rxd.hu>
Authored: Mon Jul 25 14:19:31 2016 -0700
Committer: Ashutosh Chauhan <hashutosh@apache.org>
Committed: Mon Jul 25 14:19:31 2016 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java     | 5 +++--
 ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9f40c8fb/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
index 2515b2a..ad48091 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java
@@ -467,12 +467,13 @@ public class ExplainTask extends Task<ExplainWork> implements
Serializable {
         }
       }
       else if (ent.getValue() instanceof Map) {
+        String stringValue = getBasictypeKeyedMap((Map)ent.getValue()).toString();
         if (out != null) {
-          out.print(ent.getValue().toString());
+          out.print(stringValue);
           out.println();
         }
         if (jsonOutput) {
-          json.put(ent.getKey().toString(), ent.getValue().toString());
+          json.put(ent.getKey().toString(), stringValue);
         }
       }
       else if (ent.getValue() != null) {

http://git-wip-us.apache.org/repos/asf/hive/blob/9f40c8fb/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
index 1da32fc..990d80c 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/exec/TestExplainTask.java
@@ -101,7 +101,6 @@ public class TestExplainTask {
     assertEquals("both maps should be sorted the same way", result1, result2);
   }
 
-  @Ignore("HIVE-14287 will fix this later")
   @Test
   public void testExplainDoesSortMapValues() throws Exception {
     LinkedHashMap<String, String> explainMap1Val = new LinkedHashMap<>();


Mime
View raw message