You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by Dafeng Wang <da...@microsoft.com> on 2016/04/20 05:17:08 UTC

Bugs in Interpreter result display for table when result's length is a little bigger

Hi All,

Today I found out a bug when review Zeppelin's code: when table's result is bigger, sometimes the result can't show them all. Let's see code here
Paragraph.controller.js, line 1116

1.       We first set graph.height as _graph.height

2.       Then in SetTable we set table's height is paragraph.result.height

3.       Problems here: if the second height is bigger than the first one, then it'll be truncated, while at the same time we set graph's style is nooverflow.

Fix proposals:

1.       Before settable, we need set the graph's height as result.height

2.       Or we remove the noOverflow

Please comments.

Regards,
Dafeng

Code:
$scope.setGraphMode = function(type, emit, refresh) {
    if (emit) {
      setNewMode(type);
    } else {
      clearUnknownColsFromGraphOption();
      // set graph height
      var height = $scope.paragraph.config.graph.height;
      angular.element('#p' + $scope.paragraph.id + '_graph').height(height);

      if (!type || type === 'table') {
        setTable($scope.paragraph.result, refresh);
      }
      else {
        setD3Chart(type, $scope.paragraph.result, refresh);
      }
    }
  };

RE: Bugs in Interpreter result display for table when result's length is a little bigger

Posted by Dafeng Wang <da...@microsoft.com>.
Typo, sorry, fix it as below


è Have the number of databases greater than 9, not name.

Regards,
Dafeng

From: Dafeng Wang
Sent: Wednesday, April 20, 2016 1:02 AM
To: users@zeppelin.incubator.apache.org
Subject: RE: Bugs in Interpreter result display for table when result's length is a little bigger

An example will be:

1.       Let’s say you have hive connected behind and have databases name great than 9

2.       Then run %sql show databases

3.       You probably will hit this issue

Regards,
Dafeng

From: Corneau Damien [mailto:corneadoug@gmail.com]
Sent: Tuesday, April 19, 2016 10:37 PM
To: users@zeppelin.incubator.apache.org<ma...@zeppelin.incubator.apache.org>
Subject: Re: Bugs in Interpreter result display for table when result's length is a little bigger

Hi Dafeng,

Can you provide a small query example?
Normally the Table has a scrollbar.


On Wed, Apr 20, 2016 at 12:17 PM, Dafeng Wang <da...@microsoft.com>> wrote:
Hi All,

Today I found out a bug when review Zeppelin’s code: when table’s result is bigger, sometimes the result can’t show them all. Let’s see code here
Paragraph.controller.js, line 1116

1.       We first set graph.height as _graph.height

2.       Then in SetTable we set table’s height is paragraph.result.height

3.       Problems here: if the second height is bigger than the first one, then it’ll be truncated, while at the same time we set graph’s style is nooverflow.

Fix proposals:

1.       Before settable, we need set the graph’s height as result.height

2.       Or we remove the noOverflow

Please comments.

Regards,
Dafeng

Code:
$scope.setGraphMode = function(type, emit, refresh) {
    if (emit) {
      setNewMode(type);
    } else {
      clearUnknownColsFromGraphOption();
      // set graph height
      var height = $scope.paragraph.config.graph.height;
      angular.element('#p' + $scope.paragraph.id<https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fscope.paragraph.id&data=01%7c01%7cdafewan%40064d.mgd.microsoft.com%7cec6edf272df645d6b19708d368cd1e42%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=HgWwEymjiDYpfdm7eve4krmbEVli6AMbx%2bGig3PUFzw%3d> + '_graph').height(height);

      if (!type || type === 'table') {
        setTable($scope.paragraph.result, refresh);
      }
      else {
        setD3Chart(type, $scope.paragraph.result, refresh);
      }
    }
  };


RE: Bugs in Interpreter result display for table when result's length is a little bigger

Posted by Dafeng Wang <da...@microsoft.com>.
An example will be:

1.       Let’s say you have hive connected behind and have databases name great than 9

2.       Then run %sql show databases

3.       You probably will hit this issue

Regards,
Dafeng

From: Corneau Damien [mailto:corneadoug@gmail.com]
Sent: Tuesday, April 19, 2016 10:37 PM
To: users@zeppelin.incubator.apache.org
Subject: Re: Bugs in Interpreter result display for table when result's length is a little bigger

Hi Dafeng,

Can you provide a small query example?
Normally the Table has a scrollbar.


On Wed, Apr 20, 2016 at 12:17 PM, Dafeng Wang <da...@microsoft.com>> wrote:
Hi All,

Today I found out a bug when review Zeppelin’s code: when table’s result is bigger, sometimes the result can’t show them all. Let’s see code here
Paragraph.controller.js, line 1116

1.       We first set graph.height as _graph.height

2.       Then in SetTable we set table’s height is paragraph.result.height

3.       Problems here: if the second height is bigger than the first one, then it’ll be truncated, while at the same time we set graph’s style is nooverflow.

Fix proposals:

1.       Before settable, we need set the graph’s height as result.height

2.       Or we remove the noOverflow

Please comments.

Regards,
Dafeng

Code:
$scope.setGraphMode = function(type, emit, refresh) {
    if (emit) {
      setNewMode(type);
    } else {
      clearUnknownColsFromGraphOption();
      // set graph height
      var height = $scope.paragraph.config.graph.height;
      angular.element('#p' + $scope.paragraph.id<https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fscope.paragraph.id&data=01%7c01%7cdafewan%40064d.mgd.microsoft.com%7cec6edf272df645d6b19708d368cd1e42%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=HgWwEymjiDYpfdm7eve4krmbEVli6AMbx%2bGig3PUFzw%3d> + '_graph').height(height);

      if (!type || type === 'table') {
        setTable($scope.paragraph.result, refresh);
      }
      else {
        setD3Chart(type, $scope.paragraph.result, refresh);
      }
    }
  };


Re: Bugs in Interpreter result display for table when result's length is a little bigger

Posted by Corneau Damien <co...@gmail.com>.
Hi Dafeng,

Can you provide a small query example?
Normally the Table has a scrollbar.


On Wed, Apr 20, 2016 at 12:17 PM, Dafeng Wang <da...@microsoft.com> wrote:

> Hi All,
>
>
>
> Today I found out a bug when review Zeppelin’s code: when table’s result
> is bigger, sometimes the result can’t show them all. Let’s see code here
>
> Paragraph.controller.js, line 1116
>
> 1.       We first set graph.height as _graph.height
>
> 2.       Then in SetTable we set table’s height is paragraph.result.height
>
> 3.       Problems here: if the second height is bigger than the first
> one, then it’ll be truncated, while at the same time we set graph’s style
> is nooverflow.
>
>
>
> Fix proposals:
>
> 1.       Before settable, we need set the graph’s height as result.height
>
> 2.       Or we remove the noOverflow
>
>
>
> Please comments.
>
>
>
> Regards,
>
> Dafeng
>
>
>
> Code:
>
> *$scope.setGraphMode = function(type, emit, refresh) {*
>
> *    if (emit) {*
>
> *      setNewMode(type);*
>
> *    } else {*
>
> *      clearUnknownColsFromGraphOption();*
>
> *      // set graph height*
>
> *      var height = $scope.paragraph.config.graph.height;*
>
> *      angular.element('#p' + $scope.paragraph.id
> <http://scope.paragraph.id> + '_graph').height(height);*
>
>
>
> *      if (!type || type === 'table') {*
>
> *        setTable($scope.paragraph.result, refresh);*
>
> *      }*
>
> *      else {*
>
> *        setD3Chart(type, $scope.paragraph.result, refresh);*
>
> *      }*
>
> *    }*
>
> *  };*
>