carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [1/2] incubator-carbondata git commit: added vaidation for table name with spaces
Date Tue, 21 Feb 2017 01:36:14 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 716517619 -> 57f22e834


added vaidation for table name with spaces


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/c4b6e3ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/c4b6e3ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/c4b6e3ee

Branch: refs/heads/master
Commit: c4b6e3eeccdcb5015f67f937e05fe947c96296a5
Parents: 7165176
Author: anubhav100 <anubhav.tarar@knoldus.in>
Authored: Sun Jan 29 18:01:44 2017 +0530
Committer: jackylk <jacky.likun@huawei.com>
Committed: Tue Feb 21 09:35:13 2017 +0800

----------------------------------------------------------------------
 .../spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/c4b6e3ee/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala b/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala
index b44b066..f92c007 100644
--- a/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala
+++ b/integration/spark2/src/main/scala/org/apache/spark/sql/CarbonSource.scala
@@ -112,6 +112,9 @@ class CarbonSource extends CreatableRelationProvider
     if (StringUtils.isBlank(tableName)) {
       throw new MalformedCarbonCommandException("The Specified Table Name is Blank")
     }
+    if (tableName.contains(" ")) {
+      throw new MalformedCarbonCommandException("Table Name Should not have spaces ")
+    }
     val options = new CarbonOption(parameters)
     try {
       CarbonEnv.get.carbonMetastore.lookupRelation(Option(dbName), tableName)(sparkSession)


Mime
View raw message