kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject kylin git commit: KYLIN 2768 wrong UI for count distinct measure
Date Sun, 30 Jul 2017 10:07:34 GMT
Repository: kylin
Updated Branches:
  refs/heads/master a536e7a16 -> d2982dc17


KYLIN 2768 wrong  UI for count distinct measure


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

Branch: refs/heads/master
Commit: d2982dc17bdd81ac12cb80d88f4689ef37be6d7f
Parents: a536e7a
Author: chenzhx <346839943@qq.com>
Authored: Sun Jul 30 18:04:07 2017 +0800
Committer: chenzhx <346839943@qq.com>
Committed: Sun Jul 30 18:07:24 2017 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeMeasures.js      | 18 +++++++++++-------
 webapp/app/partials/cubeDesigner/measures.html |  5 ++---
 2 files changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/d2982dc1/webapp/app/js/controllers/cubeMeasures.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeMeasures.js b/webapp/app/js/controllers/cubeMeasures.js
index 8b0271c..347f3b7 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -218,7 +218,7 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes
           $scope.newMeasure.function.configuration[versionKey]=version;
           });
     }
-    if ($scope.newMeasure.function.expression === 'COUNT_DISTINCT' ) {
+    if ($scope.newMeasure.function.expression === 'COUNT_DISTINCT' && $scope.newMeasure.function.returntype!=='bitmap')
{
 
       var hasExisted = [];
 
@@ -344,16 +344,20 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes
   }
 
   //map right return type for param
-  $scope.measureReturnTypeUpdate = function(){
+  $scope.measureReturnTypeUpdate = function() {
 
-    if($scope.newMeasure.function.expression == 'TOP_N'){
-      if($scope.newMeasure.function.parameter.type==""||!$scope.newMeasure.function.parameter.type){
-        $scope.newMeasure.function.parameter.type= 'column';
+    if ($scope.newMeasure.function.expression == 'TOP_N') {
+      if ($scope.newMeasure.function.parameter.type == "" || !$scope.newMeasure.function.parameter.type)
{
+        $scope.newMeasure.function.parameter.type = 'column';
       }
-      $scope.convertedColumns=[];
+      $scope.convertedColumns = [];
       $scope.newMeasure.function.returntype = "topn(100)";
       return;
-    }else if($scope.newMeasure.function.expression == 'EXTENDED_COLUMN'){
+    } else if ($scope.newMeasure.function.expression == 'COUNT_DISTINCT') {
+      $scope.newMeasure.function.parameter.type= 'column';
+      $scope.newMeasure.function.returntype = "hllc(10)";
+      $scope.convertedColumns = [];
+    } else if($scope.newMeasure.function.expression == 'EXTENDED_COLUMN'){
       $scope.newMeasure.function.parameter.type= 'column';
       $scope.newMeasure.function.returntype = "extendedcolumn(100)";
       return;

http://git-wip-us.apache.org/repos/asf/kylin/blob/d2982dc1/webapp/app/partials/cubeDesigner/measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/measures.html b/webapp/app/partials/cubeDesigner/measures.html
index 89c7142..8a5cae9 100755
--- a/webapp/app/partials/cubeDesigner/measures.html
+++ b/webapp/app/partials/cubeDesigner/measures.html
@@ -69,7 +69,6 @@
               </table>
       </div>
   </ng-form>
-
   <!--Add Measures Button-->
   <div class="form-group">
       <button class="btn btn-sm btn-info" ng-click="addNewMeasure()" ng-show="state.mode=='edit'
&& !newMeasure" ng-disabled="instance.status=='READY'">
@@ -218,10 +217,10 @@
                       </div>
 
                       <!--Group by Column-->
-                      <div class="form-group" ng-if="newMeasure.function.expression ===
'TOP_N'||newMeasure.function.expression === 'COUNT_DISTINCT'" >
+                      <div class="form-group" ng-if="newMeasure.function.expression ===
'TOP_N'||(newMeasure.function.expression === 'COUNT_DISTINCT' && newMeasure.function.returntype!=='bitmap')"
>
                         <div class="row">
                           <label class="col-xs-12 col-sm-3 control-label no-padding-right
font-color-default">
-                            <b>Group by Column</b>
+                            <b ng-if="newMeasure.function.expression === 'TOP_N'">Group
by Column</b>
                           </label>
                           <div class="form-group large-popover" >
                               <div class="box-body">


Mime
View raw message