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

Bucketing: incorrect inserts with inserting from similarly bucketed table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.2.0
    • None
    • Query Processor
    • None

    Description

      create temporary table foo(x int, y int) clustered by (x) sorted by (y) into 11 buckets stored as orc;
      create temporary table bar like foo;
      insert into foo values (23,2); insert into foo values(23,2); insert into foo values(23,2);
      insert overwrite table bar select * from foo;
      

      At this point, the table bar is incorrectly loaded.

      hive> select x, regexp_replace(INPUT__FILE__NAME, '.*/','') from bar ;
      OK
      23      000000_0
      23      000001_0
      23      000002_0
      Time taken: 0.22 seconds, Fetched: 3 row(s)
      
      hive> select x, regexp_replace(INPUT__FILE__NAME, '.*/','') from foo;
      OK
      23      000001_0
      23      000001_0_copy_1
      23      000001_0_copy_2
      Time taken: 0.329 seconds, Fetched: 3 row(s)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: