Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-1485

Fix Deletes issued without any prior commits exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • None

    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)
      ```

       

      Attachments

        Issue Links

          Activity

            People

              wangxianghu#1 wangxianghu#1
              wangxianghu#1 wangxianghu#1
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: