You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2016/02/22 18:21:19 UTC

ambari git commit: AMBARI-14827. HiveViews: Value in cell coming up as null for select query. (Gaurav Nagar via dipayanb)

Repository: ambari
Updated Branches:
  refs/heads/trunk b0ab893ff -> 9dfe929ee


AMBARI-14827. HiveViews: Value in cell coming up as null for select query. (Gaurav Nagar via dipayanb)


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

Branch: refs/heads/trunk
Commit: 9dfe929ee399953177611fe1f26abe98f5b9a265
Parents: b0ab893
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Mon Feb 22 22:50:52 2016 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Mon Feb 22 22:50:52 2016 +0530

----------------------------------------------------------------------
 .../view/hive/resources/jobs/ResultsPaginationController.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9dfe929e/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/ResultsPaginationController.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/ResultsPaginationController.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/ResultsPaginationController.java
index 84dec4d..cc2ff42 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/ResultsPaginationController.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/ResultsPaginationController.java
@@ -190,7 +190,12 @@ public class ResultsPaginationController {
       for(Object[] row : rows ){
         String[] strs = new String[row.length];
         for( int colNum = 0 ; colNum < row.length ; colNum++ ){
-          strs[colNum] = String.valueOf(row[colNum]);
+          String value = String.valueOf(row[colNum]);
+          if(row[colNum] != null && (value.isEmpty() || value.equalsIgnoreCase("null"))){
+            strs[colNum] = String.format("\"%s\"",value);
+          }else{
+            strs[colNum] = value;
+          }
         }
         this.rows.add(strs);
       }