You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by zh...@apache.org on 2016/10/20 08:43:37 UTC

kylin git commit: TopN measure: need select 'constant' '1' as the SUM|ORDER parameter

Repository: kylin
Updated Branches:
  refs/heads/master 24f26dbd6 -> eef157c7d


TopN measure: need select 'constant'  '1' as the SUM|ORDER parameter


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

Branch: refs/heads/master
Commit: eef157c7d0cb59021802782fb32b111edd552bd9
Parents: 24f26db
Author: Jason <ji...@163.com>
Authored: Thu Oct 20 16:42:52 2016 +0800
Committer: Jason <ji...@163.com>
Committed: Thu Oct 20 16:43:27 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeMeasures.js      | 4 +++-
 webapp/app/partials/cubeDesigner/measures.html | 7 +++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/eef157c7/webapp/app/js/controllers/cubeMeasures.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeMeasures.js b/webapp/app/js/controllers/cubeMeasures.js
index 2f191f9..e1ade17 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -273,8 +273,10 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes
   $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';
+      }
       $scope.convertedColumns=[];
-      $scope.newMeasure.function.parameter.type= 'column';
       $scope.newMeasure.function.returntype = "topn(100)";
       return;
     }else if($scope.newMeasure.function.expression == 'EXTENDED_COLUMN'){

http://git-wip-us.apache.org/repos/asf/kylin/blob/eef157c7/webapp/app/partials/cubeDesigner/measures.html
----------------------------------------------------------------------
diff --git a/webapp/app/partials/cubeDesigner/measures.html b/webapp/app/partials/cubeDesigner/measures.html
index ec7110f..925cc79 100755
--- a/webapp/app/partials/cubeDesigner/measures.html
+++ b/webapp/app/partials/cubeDesigner/measures.html
@@ -112,7 +112,7 @@
                           </div>
                       </div>
                       <!--Param Type-->
-                      <div class="form-group" ng-if="newMeasure.function.expression !== 'EXTENDED_COLUMN' && newMeasure.function.expression !== 'TOP_N'">
+                      <div class="form-group" ng-if="newMeasure.function.expression !== 'EXTENDED_COLUMN'">
                           <div class="row">
                               <label class="col-xs-12 col-sm-3 control-label no-padding-right font-color-default"><b>Param Type</b></label>
                               <div class="col-xs-12 col-sm-6">
@@ -355,7 +355,10 @@
 </script>
 
 <script type="text/ng-template" id="topnTip.html">
-  <p>Will use this column for SUM and Order by</p>
+  <p>
+    Will use this column for SUM and Order by.<br/>
+    For constant value 1, will use SUM(1).
+  </p>
 </script>
 
 <script type="text/ng-template" id="hostTableTip.html">