zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: [ZEPPELIN-2084] z.show doesn't show dataframe
Date Sun, 12 Feb 2017 08:30:31 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 99f01f7fa -> d954687e0


[ZEPPELIN-2084] z.show doesn't show dataframe

### What is this PR for?

following may/may not display the result
```
z.show(sc.parallelize((1 to 1000000).toList).toDF, 1000000)
```

it was because of column information is not refreshed as data refresh in TableVisualization.

### What type of PR is it?
Bug Fix

### Todos
* [x] - fix bug

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2084

### How should this be tested?

run followings multiple times. and see if it displays result every time.
```
z.show(sc.parallelize((1 to 1000000).toList).toDF, 1000000)
```

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Lee moon soo <moon@apache.org>

Closes #2005 from Leemoonsoo/ZEPPELIN-2084 and squashes the following commits:

8d57433 [Lee moon soo] recreate column info when data is changed


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

Branch: refs/heads/master
Commit: d954687e0f552e3904f019bf078360e47e5dbdd7
Parents: 99f01f7
Author: Lee moon soo <moon@apache.org>
Authored: Sat Feb 11 09:39:20 2017 +0900
Committer: Lee moon soo <moon@apache.org>
Committed: Sun Feb 12 17:30:21 2017 +0900

----------------------------------------------------------------------
 .../app/visualization/builtins/visualization-table.js   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d954687e/zeppelin-web/src/app/visualization/builtins/visualization-table.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/visualization/builtins/visualization-table.js b/zeppelin-web/src/app/visualization/builtins/visualization-table.js
index 440f9f0..0c58407 100644
--- a/zeppelin-web/src/app/visualization/builtins/visualization-table.js
+++ b/zeppelin-web/src/app/visualization/builtins/visualization-table.js
@@ -36,21 +36,17 @@ export default class TableVisualization extends Visualization {
     var container = this.targetEl.css('height', height).get(0);
     var resultRows = tableData.rows;
     var columnNames = _.pluck(tableData.columns, 'name');
+    var columns = Array.apply(null, Array(tableData.columns.length)).map(function() {
+      return {type: 'text'};
+    });
 
     if (this.hot) {
       this.hot.destroy();
     }
 
-    if (!this.columns) {
-      this.columns = Array.apply(null, Array(tableData.columns.length)).map(function() {
-        return {type: 'text'};
-      });
-    }
-
     var handsonHelper = new HandsonHelper();
-
     this.hot = new Handsontable(container, handsonHelper.getHandsonTableConfig(
-      this.columns, columnNames, resultRows));
+      columns, columnNames, resultRows));
     this.hot.validateCells(null);
   };
 


Mime
View raw message