ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbhowm...@apache.org
Subject ambari git commit: AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb)
Date Fri, 10 Feb 2017 09:40:46 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 09e35e1e3 -> 232b585bd


AMBARI-19949. Hive View 2.0: Introduce validation for expression precision >= scale. (dipayanb)


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

Branch: refs/heads/trunk
Commit: 232b585bdd0350f5b2fb8c2c7ebf200cd3286fa7
Parents: 09e35e1
Author: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Authored: Fri Feb 10 15:09:29 2017 +0530
Committer: Dipayan Bhowmick <dipayan.bhowmick@gmail.com>
Committed: Fri Feb 10 15:10:17 2017 +0530

----------------------------------------------------------------------
 contrib/views/hive20/src/main/resources/ui/app/models/column.js | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/232b585b/contrib/views/hive20/src/main/resources/ui/app/models/column.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive20/src/main/resources/ui/app/models/column.js b/contrib/views/hive20/src/main/resources/ui/app/models/column.js
index 1d9ccce..f38309b 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/models/column.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/models/column.js
@@ -87,6 +87,8 @@ let Column = Ember.Object.extend(Ember.Copyable,{
         this.get('errors').pushObject({type: 'precision', error: "Precision can only be a
number"});
       } else if(this.get('precision') <= 0) {
         this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater
than zero"});
+      } else if(this.get('type.hasScale') && this.get('scale') && (this.get('precision')
< this.get('scale'))) {
+        this.get('errors').pushObject({type: 'precision', error: "Precision can only be greater
than scale"});
       }
 
     }


Mime
View raw message