Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18154

IOW Acid Load Data/Insert with Overwrite in multi statement transactions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • None
    • Transactions
    • None

    Description

      Consider:

      START TRANSACTION
      insert into T values(1,2),(3,4)
      load data local inpath '" + getWarehouseDir() + "/1/data' overwrite into table T
      update T set a = 0 where a = 6
      COMMIT
      

      So what we should have on disk is

      ├── base_0000028
      │   ├── 000000_0
      │   └── _metadata_acid
      ├── delete_delta_0000028_0000028_0002
      │   └── bucket_00000
      ├── delta_0000028_0000028_0000
      │   └── bucket_00000
      └── delta_0000028_0000028_0002
          └── bucket_00000
      

      where base_28 is from overwrite, delta_0000028_0000028_0000 from 1st insert nad delta_0000028_0000028_0002/delete_delta_0000028_0000028_0002 is from update.

      AcidUtils.getAcidState() only returns base_28 thinking that all other deltas are included in it - not what we want here.
      Same applies for Insert Overwrite.

      The simple way to get correct behavior is to disallow commands with Overwrite clause in multi-statement txns.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: