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

Hive does not honor type for partition columns

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.12.0
    • CLI
    • None

    Description

      Hive does not consider the type of the partition column while writing partitions. Consider for example the query:

      create table tab1 (id1 int, id2 string) PARTITIONED BY(month string,day int) row format delimited fields terminated by ',';
      alter table tab1 add partition (month='June', day='second');
      

      Hive accepts this query. However if you try to select from this table and insert into another expecting schema match, it will insert nulls instead. We should throw an exception on such user error at the time the partition addition/load happens.

      Attachments

        1. HIVE-5297.8.patch
          26 kB
          Vikram Dixit K
        2. HIVE-5297.7.patch
          26 kB
          Vikram Dixit K
        3. HIVE-5297.6.patch
          19 kB
          Vikram Dixit K
        4. HIVE-5297.5.patch
          19 kB
          Vikram Dixit K
        5. HIVE-5297.4.patch
          39 kB
          Vikram Dixit K
        6. HIVE-5297.3.patch
          39 kB
          Vikram Dixit K
        7. HIVE-5297.2.patch
          37 kB
          Vikram Dixit K
        8. HIVE-5297.1.patch
          37 kB
          Vikram Dixit K

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vikram.dixit Vikram Dixit K Assign to me
            vikram.dixit Vikram Dixit K
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment