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

Load data inpath into a new partition without overwrite does not move the file

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: 0.4.0, 0.5.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      HIVE-718. Fix Loading data inpath into a new partition. (Namit Jain via zshao)
      Show
      HIVE-718 . Fix Loading data inpath into a new partition. (Namit Jain via zshao)

      Description

      The bug can be reproduced as following. Note that it only happens for partitioned tables. The select after the first load returns nothing, while the second returns the data correctly.

      insert.txt in the current local directory contains 3 lines: "a", "b" and "c".

      > create table tmp_insert_test (value string) stored as textfile;
      > load data local inpath 'insert.txt' into table tmp_insert_test;
      > select * from tmp_insert_test;
      a
      b
      c
      > create table tmp_insert_test_p ( value string) partitioned by (ds string) stored as textfile;
      > load data local inpath 'insert.txt' into table tmp_insert_test_p partition (ds = '2009-08-01');
      > select * from tmp_insert_test_p where ds= '2009-08-01';
      > load data local inpath 'insert.txt' into table tmp_insert_test_p partition (ds = '2009-08-01');
      > select * from tmp_insert_test_p where ds= '2009-08-01';
      a       2009-08-01
      b       2009-08-01
      d       2009-08-01
      

        Attachments

        1. hive.718.1.patch
          45 kB
          Namit Jain
        2. HIVE-718.1.patch
          0.9 kB
          He Yongqiang
        3. HIVE-718.2.patch
          1 kB
          He Yongqiang
        4. hive-718.txt
          2 kB
          Todd Lipcon

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment