[ 
https://issues.apache.org/jira/browse/HUDI-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

wangxianghu updated HUDI-1485:
------------------------------
    Description: 
step to reproduce:

just use the delete demo in the quickstart

```

 // spark-shell
 // fetch total records count
 spark.sql("select uuid, partitionpath from hudi_trips_snapshot").count()
 // fetch two records to be deleted
 val ds = spark.sql("select uuid, partitionpath from 
hudi_trips_snapshot").limit(2)

// issue deletes
 val deletes = dataGen.generateDeletes(ds.collectAsList())
 val df = spark.read.json(spark.sparkContext.parallelize(deletes, 2))

df.write.format("hudi").
 options(getQuickstartWriteConfigs).
 option(OPERATION_OPT_KEY,"delete").
 option(PRECOMBINE_FIELD_OPT_KEY, "ts").
 option(RECORDKEY_FIELD_OPT_KEY, "uuid").
 option(PARTITIONPATH_FIELD_OPT_KEY, "partitionpath").
 option(TABLE_NAME, tableName).
 mode(Append).
 save(basePath)
 ```

 

  was:
use the delete demo in quickstart

```
 
// spark-shell
// fetch total records count
spark.sql("select uuid, partitionpath from hudi_trips_snapshot").count()
// fetch two records to be deleted
val ds = spark.sql("select uuid, partitionpath from 
hudi_trips_snapshot").limit(2)

// issue deletes
val deletes = dataGen.generateDeletes(ds.collectAsList())
val df = spark.read.json(spark.sparkContext.parallelize(deletes, 2))

df.write.format("hudi").
  options(getQuickstartWriteConfigs).
  option(OPERATION_OPT_KEY,"delete").
  option(PRECOMBINE_FIELD_OPT_KEY, "ts").
  option(RECORDKEY_FIELD_OPT_KEY, "uuid").
  option(PARTITIONPATH_FIELD_OPT_KEY, "partitionpath").
  option(TABLE_NAME, tableName).
  mode(Append).
  save(basePath)
```

 


> Fix Deletes issued without any prior commits exception
> ------------------------------------------------------
>
>                 Key: HUDI-1485
>                 URL: https://issues.apache.org/jira/browse/HUDI-1485
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: wangxianghu
>            Assignee: wangxianghu
>            Priority: Major
>
> step to reproduce:
> just use the delete demo in the quickstart
> ```
>  // spark-shell
>  // fetch total records count
>  spark.sql("select uuid, partitionpath from hudi_trips_snapshot").count()
>  // fetch two records to be deleted
>  val ds = spark.sql("select uuid, partitionpath from 
> hudi_trips_snapshot").limit(2)
> // issue deletes
>  val deletes = dataGen.generateDeletes(ds.collectAsList())
>  val df = spark.read.json(spark.sparkContext.parallelize(deletes, 2))
> df.write.format("hudi").
>  options(getQuickstartWriteConfigs).
>  option(OPERATION_OPT_KEY,"delete").
>  option(PRECOMBINE_FIELD_OPT_KEY, "ts").
>  option(RECORDKEY_FIELD_OPT_KEY, "uuid").
>  option(PARTITIONPATH_FIELD_OPT_KEY, "partitionpath").
>  option(TABLE_NAME, tableName).
>  mode(Append).
>  save(basePath)
>  ```
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to