KYLIN 2513 SUM measure return type should not overflow

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

Branch: refs/heads/master-hbase0.98
Commit: 023fa2387f9685efc64cc21a0fcc7b2e4457d9e7
Parents: 88e66f3
Author: chenzhx <346839...@qq.com>
Authored: Thu Apr 6 15:34:14 2017 +0800
Committer: chenzhx <346839...@qq.com>
Committed: Thu Apr 6 15:34:14 2017 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeMeasures.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/023fa238/webapp/app/js/controllers/cubeMeasures.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeMeasures.js 
b/webapp/app/js/controllers/cubeMeasures.js
index 856e74f..73a6cd0 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -370,10 +370,10 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, 
$modal,MetaModel,cubes
           
if(colType==="smallint"||colType==="int"||colType==="bigint"||colType==="integer"){
             $scope.newMeasure.function.returntype= 'bigint';
           }else{
-            if(colType.indexOf('decimal')!=-1){
-              $scope.newMeasure.function.returntype= colType;
+           
if(colType.indexOf('decimal')!=-1||colType==="double"||colType==="float"){
+              $scope.newMeasure.function.returntype= 'decimal(19,4)';
             }else{
-              $scope.newMeasure.function.returntype= 'decimal';
+              $scope.newMeasure.function.returntype= 'decimal(14,0)';
             }
           }
           break;

Reply via email to