luguosheng1314 closed pull request #371: KYLIN-3695, fix lose decimal scale 
value in column type decimal(a, b)
URL: https://github.com/apache/kylin/pull/371
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/webapp/app/js/controllers/cubeMeasures.js 
b/webapp/app/js/controllers/cubeMeasures.js
index 7beb528d6b..f1821dda87 100644
--- a/webapp/app/js/controllers/cubeMeasures.js
+++ b/webapp/app/js/controllers/cubeMeasures.js
@@ -465,10 +465,10 @@ KylinApp.controller('CubeMeasuresCtrl', function ($scope, 
$modal,MetaModel,cubes
           return 'bigint';
         } else {
          if(colType.indexOf('decimal') != -1) {
-            var returnRegex = new 
RegExp('(\\w+)(?:\\((\\w+?)(?:\\,(\\w+?))?\\))?')
-            var returnValue = returnRegex.exec(colType)
-            var precision = 19
-            var scale = returnValue[3]
+            var returnRegex = new 
RegExp('(\\w+)(?:\\((\\w+?)(?:\\,(\\w+?))?\\))?');
+            var returnValue = returnRegex.exec(colType);
+            var precision = 19;
+            var scale = returnValue[3] || 0;
             return 'decimal(' + precision + ',' + scale + ')';
           }else{
             return colType;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to