carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chenerlu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CARBONDATA-1203) insert data caused many duplicated data on spark 1.6.2
Date Fri, 23 Jun 2017 02:24:00 GMT

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

chenerlu edited comment on CARBONDATA-1203 at 6/23/17 2:23 AM:
---------------------------------------------------------------

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]


was (Author: chenerlu):
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)

Mime
View raw message