发自网易邮箱大师



--------- 转发的邮件 ---------

发件人: [email protected]
发送日期: 2017年06月19日 23:44
收件人: 杨卫,yangwei545
抄送人:
主题: 转发: update bug with carbondata1.1.0 in spark1.6.0




[email protected]
 
发件人: [email protected]
发送时间: 2017-06-19 23:37
收件人: user-subscribe; dev-subscribe
主题: update bug with carbondata1.1.0 in spark1.6.0
Hi,
  My test case is as follows:
  
import  cc.implicits._
var kk:Seq[(String,String,String,Int)] = Nil
for(i<-1 to 80000){
   kk = kk ++Seq((i+"", "name","city", i))
}
cc.sc.makeRDD(kk).toDF("id","name","city","age").registerTempTable("t1")
cc.sql("DROP TABLE IF EXISTS testtable")
cc.sql("CREATE TABLE IF NOT EXISTS testtable(id string, name string, city 
string, age Int) STORED BY 'carbondata'")
cc.sql("insert INTO TABLE testtable select * from t1")
  cc.sql("""
         UPDATE testtable SET (testtable.name) = ('india') WHERE testtable.id = 
'10'
         """).show()
cc.sql("SELECT count(distinct id) FROM testtable").show()
cc.sql("""
        UPDATE testtable SET (testtable.name) = ('india') WHERE testtable.id = 
'10'
        """).show()
 cc.sql("SELECT count(distinct id) FROM testtable").show()
Only one record is updated, but the total number of records is missing by two
[email protected]

Reply via email to