hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-hudi] lamber-ken commented on issue #1326: org.apache.hudi.exception.HoodieUpsertException: Error upserting bucketType UPDATE for partition :0
Date Thu, 13 Feb 2020 00:09:31 GMT
lamber-ken commented on issue #1326: org.apache.hudi.exception.HoodieUpsertException: Error
upserting bucketType UPDATE for partition :0
URL: https://github.com/apache/incubator-hudi/issues/1326#issuecomment-585482228
 
 
   @matthewLiem welcome :)
   
   **Record some  notes:**
   
   Change `lit(123456)` to `lit(123456L)`
   
   ```
   val updateDF = inputDF.withColumn("run_detail_id", lit(123456))
   ```
   
   Reproduce steps:
   ```
   import org.apache.spark.sql.functions._
   import org.apache.spark.sql.SparkSession
   
   val inputDataPath = "file:///tmp/test/ttt/*"
   val hudiTableName = "hudi_identity"
   val hudiTablePath = "file:///tmp/test/nnn"
   
   val hudiOptions = Map[String,String](
       "hoodie.datasource.write.recordkey.field" -> "auth_id",
       "hoodie.table.name" -> hudiTableName, 
       "hoodie.datasource.write.precombine.field" -> "last_mod_time")
   
   // create
   val inputDF = spark.read.format("parquet").load(inputDataPath)
   inputDF.write.format("org.apache.hudi").options(hudiOptions).mode("Overwrite").save(hudiTablePath)
   
   
   // update
   val inputDF = spark.read.format("parquet").load(inputDataPath)
   val updateDF = inputDF.withColumn("run_detail_id", lit(123456))
   updateDF.write.format("org.apache.hudi").options(hudiOptions).mode("Append").save(hudiTablePath)
   ```
   
   [data.parquet.zip](https://github.com/apache/incubator-hudi/files/4195852/data.parquet.zip)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message