You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2017/02/10 09:39:44 UTC
ambari git commit: AMBARI-19949. Hive View 2.0: Introduce validation
for expression precision >= scale. (dipayanb)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 20a224cec -> 9fb94ade5
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/9fb94ade
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9fb94ade
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9fb94ade
Branch: refs/heads/branch-2.5
Commit: 9fb94ade5fc47aa8731e6cfdfdf9559f29bcb364
Parents: 20a224c
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Fri Feb 10 15:09:29 2017 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Fri Feb 10 15:09:29 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/9fb94ade/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"});
}
}