Uploaded image for project: 'Apache Hudi'
  1. Apache Hudi
  2. HUDI-1658 [UMBRELLA] Spark Sql Support For Hudi
  3. HUDI-2282

Insert for an already existing record throws DuplicateKeyException with primary keyed spark sql table

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      https://gist.github.com/nsivabalan/9837a90b1481c479a9c600bf16bafa57

       

      create table hudi_test4 (id int, name string, price double, ts long) using hudi options(primaryKey = 'id', precombineField = 'ts') partitioned by (name) location 'file:///tmp/hudi_testing/hudi_test4';
      
      insert into hudi_test4 values(1, 100.0, 100000010, "abc");insert into hudi_test4 values(2, 200.0, 200000010, "abc");insert into hudi_test4 values(3, 300.0, 300000010, "abc");
      
      // this throws DuplicateKeyException ? Even though operation w/ hudi is "upsert". 
      
      insert into hudi_test4 values(1, 600.0, 600000010, "abc");
      

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              pzw2018 pengzhiwei
              Reporter:
              shivnarayan sivabalan narayanan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: