You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "chenerlu (JIRA)" <ji...@apache.org> on 2017/06/23 02:23:00 UTC

[jira] [Commented] (CARBONDATA-1203) insert data caused many duplicated data on spark 1.6.2

    [ https://issues.apache.org/jira/browse/CARBONDATA-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060325#comment-16060325 ] 

chenerlu commented on CARBONDATA-1203:
--------------------------------------

Hi, I encounter same problem. Issue can be summarized as follows.
Step 1: create a carbon table.
  cc.sql("CREATE TABLE IF NOT EXISTS t3 (id Int, name String) STORED BY 'carbondata'")

Step 2: load data, then t3 will have 10 records
   cc.sql("LOAD DATA LOCAL INPATH 'mypathofdata' INTO TABLE t3 ")

Step 3: insert constant into table t3
cc.sql("INSERT INTO TABLE t3 SELECT 1, 'jack' FROM t3")

Step4: count table t3
cc.sql("SELECT count(*) FROM t3")

Actual result:  t3 will have 20 records.
Expected result:  t3 should have 11 records or throw sql.AnalysisException (This will be same as Hive table I think)

Any idea about this issue, which solution is better ? 
[~ravi.pesala]

> insert data caused  many duplicated data on spark 1.6.2
> -------------------------------------------------------
>
>                 Key: CARBONDATA-1203
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-1203
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Jarck
>
> I use branch-1.1 do insert test on spark 1.6.2 in my local machine
> I try to  run the sql as below to insert a data
>       spark.sql(s"""
>              insert into $tableName select $id,'$date','$country','$testName'
>              ,'$phoneType','$serialname',$salary from $tableName
>              """).show()
> at last the data has been inserted successfully, but it inserted many duplicated data



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)