GitHub user anubhav100 opened a pull request:

    https://github.com/apache/carbondata/pull/1777

    [CARBONDATA-1973] User Should not Be able to give the duplicate column name 
in partitio…

    **Jira Link:https://issues.apache.org/jira/browse/CARBONDATA-1973**
    
    **User Should not Be able to give the duplicate column name in partition 
even if its case sensitive,hive also does the same** 
    
    1.carbon.sql("CREATE TABLE uniqdata_char2(name char,id int) partitioned by 
(NAME char)stored by 'carbondata' ")
     name [uniqdata_char2]
    18/01/03 12:44:44 WARN HiveExternalCatalog: Couldn't find corresponding 
Hive SerDe for data source provider org.apache.spark.sql.CarbonSource. 
Persisting data source table `default`.`uniqdata_char2` into Hive metastore in 
Spark SQL specific format, which is NOT compatible with Hive.
    18/01/03 12:44:44 AUDIT CarbonCreateTableCommand: 
[anubhav-Vostro-3559][anubhav][Thread-1]Table created with Database name 
[default] and Table name [uniqdata_char2]
    res30: org.apache.spark.sql.DataFrame = []
    
    as we can see table get created successfully
    
    2.try same thing on hive
    
    carbon.sql("CREATE TABLE uniqdata_char2_hive(name char,id int) partitioned 
by (NAME char) ")
    it gives exception
    
    org.apache.spark.sql.AnalysisException: Found duplicate column(s) in table 
definition of `uniqdata_char2_hive`: name;
      at 
org.apache.spark.sql.execution.datasources.AnalyzeCreateTable.org$apache$spark$sql$execution$datasources$AnalyzeCreateTable$$failAnalysis(rules.scala:198)
    
    behaviour of carbondata should be similiar to hive

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anubhav100/incubator-carbondata 
CARBONDATA-1973

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1777.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1777
    
----
commit 7cb1ca1f93179a4936f828864edd98e61585402f
Author: anubhav100 <anubhav.tarar@...>
Date:   2018-01-08T11:06:25Z

    User Should not Be able to give the duplicate column name in partition even 
if its case sensitive

----


---

Reply via email to