kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhongj...@apache.org
Subject kylin git commit: KYLIN-2010 integer encoding bug fix
Date Tue, 25 Oct 2016 10:40:59 GMT
Repository: kylin
Updated Branches:
  refs/heads/master eb3943792 -> 7a25294f0


KYLIN-2010 integer encoding bug fix


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

Branch: refs/heads/master
Commit: 7a25294f0b7d31c583f923b191130780ef731dd8
Parents: eb39437
Author: Jason <jiatuer@163.com>
Authored: Tue Oct 25 18:39:51 2016 +0800
Committer: Jason <jiatuer@163.com>
Committed: Tue Oct 25 18:39:51 2016 +0800

----------------------------------------------------------------------
 webapp/app/js/controllers/cubeAdvanceSetting.js | 12 ++++++++++--
 webapp/app/js/controllers/cubeMeasures.js       | 16 ++++++++++++----
 2 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/7a25294f/webapp/app/js/controllers/cubeAdvanceSetting.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeAdvanceSetting.js b/webapp/app/js/controllers/cubeAdvanceSetting.js
index be90f65..0ba321c 100644
--- a/webapp/app/js/controllers/cubeAdvanceSetting.js
+++ b/webapp/app/js/controllers/cubeAdvanceSetting.js
@@ -27,18 +27,24 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
   angular.forEach($scope.cubeMetaFrame.rowkey.rowkey_columns,function(item){
     //var _isDictionaries = item.encoding === "dict"?"true":"false";
     var _isFixedLength = item.encoding.substring(0,12) === "fixed_length"?"true":"false";//fixed_length:12
-    var _isIntLength = item.encoding.substring(0,3) === "int"?"true":"false";//fixed_length:12
+    var _isIntegerLength = item.encoding.substring(0,7) === "integer"?"true":"false";
+    var _isIntLength = item.encoding.substring(0,3) === "int"?"true":"false";
     var _encoding = item.encoding;
     var _valueLength ;
     if(_isFixedLength !=="false"){
       _valueLength = item.encoding.substring(13,item.encoding.length);
       _encoding = "fixed_length";
     }
-    if(_isIntLength!="false"){
+    if(_isIntLength!="false" && _isIntegerLength=="false" ){
       _valueLength = item.encoding.substring(4,item.encoding.length);
       _encoding = "int";
     }
 
+    if(_isIntegerLength!="false" ){
+      _valueLength = item.encoding.substring(8,item.encoding.length);
+      _encoding = "integer";
+    }
+
     var rowkeyObj = {
       column:item.column,
       encoding:_encoding,
@@ -66,6 +72,8 @@ KylinApp.controller('CubeAdvanceSettingCtrl', function ($scope, $modal,cubeConfi
       }
       else if(item.encoding=="int" && item.valueLength){
         encoding = "int:"+item.valueLength;
+      }else if(item.encoding=="integer" && item.valueLength){
+        encoding = "integer:"+item.valueLength;
       }else{
         encoding = item.encoding;
       }

http://git-wip-us.apache.org/repos/asf/kylin/blob/7a25294f/webapp/app/js/controllers/cubeMeasures.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/controllers/cubeMeasures.js b/webapp/app/js/controllers/cubeMeasures.js
index 006c6c2..dcf26b7 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -54,17 +54,24 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes
         var _name=configuration.slice(14);
         var item=$scope.newMeasure.function.configuration[configuration];
         var _isFixedLength = item.substring(0,12) === "fixed_length"?"true":"false";//fixed_length:12
-        var _isIntLength = item.substring(0,3) === "int"?"true":"false";//fixed_length:12
+        var _isIntegerLength = item.substring(0,7) === "integer"?"true":"false";
+        var _isIntLength = item.substring(0,3) === "int"?"true":"false";
         var _encoding = item;
         var _valueLength = 0 ;
         if(_isFixedLength !=="false"){
           _valueLength = item.substring(13,item.length);
           _encoding = "fixed_length";
         }
-        if(_isIntLength!="false"){
+        if(_isIntLength!="false" && _isIntegerLength=="false" ){
           _valueLength = item.substring(4,item.length);
           _encoding = "int";
         }
+
+        if(_isIntegerLength!="false" ){
+          _valueLength = item.substring(8,item.length);
+          _encoding = "integer";
+        }
+
         $scope.GroupBy = {
           name:_name,
           encoding:_encoding,
@@ -172,8 +179,9 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, $modal,MetaModel,cubes
           if(item.encoding!=="dict" && item.encoding!=="date"&& item.encoding!=="time"){
             if(item.encoding=="fixed_length" && item.valueLength){
               encoding = "fixed_length:"+item.valueLength;
-            }
-            else if(item.encoding=="int" && item.valueLength){
+            }else if(item.encoding=="integer" && item.valueLength){
+              encoding = "integer:"+item.valueLength;
+            }else if(item.encoding=="int" && item.valueLength){
               encoding = "int:"+item.valueLength;
             }else{
               encoding = item.encoding;


Mime
View raw message