You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2016/07/20 10:13:34 UTC
[06/50] [abbrv] incubator-carbondata git commit: if any invalid
column is given in the column group then create should fail with error
message. (#816)
if any invalid column is given in the column group then create should fail with error message. (#816)
Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/f7f32bf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/f7f32bf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/f7f32bf9
Branch: refs/heads/master
Commit: f7f32bf9520429f54137d122ce0cbfbeeaa0ad63
Parents: efc3951
Author: ravikiran23 <ra...@gmail.com>
Authored: Fri Jul 15 12:14:36 2016 +0530
Committer: Vimal-Das <vi...@gmail.com>
Committed: Fri Jul 15 12:14:36 2016 +0530
----------------------------------------------------------------------
.../src/main/scala/org/carbondata/spark/util/CommonUtil.scala | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/f7f32bf9/integration/spark/src/main/scala/org/carbondata/spark/util/CommonUtil.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/carbondata/spark/util/CommonUtil.scala b/integration/spark/src/main/scala/org/carbondata/spark/util/CommonUtil.scala
index 9ede819..5b8c0b2 100644
--- a/integration/spark/src/main/scala/org/carbondata/spark/util/CommonUtil.scala
+++ b/integration/spark/src/main/scala/org/carbondata/spark/util/CommonUtil.scala
@@ -46,6 +46,12 @@ object CommonUtil {
throw new MalformedCarbonCommandException(
"Column group doesn't support Timestamp datatype:" + x)
}
+ // if invalid column is present
+ else if (dims.filter { dim => dim.column.equalsIgnoreCase(x) }.size == 0) {
+ throw new MalformedCarbonCommandException(
+ "column in column group is not a valid column :" + x
+ )
+ }
}
// check if given column is present in other groups
def foundIndExistingColGrp(colName: String): Boolean = {