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

Hive does not honor type for partition columns

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: CLI
    • Labels:
      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.1.patch
          37 kB
          Vikram Dixit K
        2. HIVE-5297.2.patch
          37 kB
          Vikram Dixit K
        3. HIVE-5297.3.patch
          39 kB
          Vikram Dixit K
        4. HIVE-5297.4.patch
          39 kB
          Vikram Dixit K
        5. HIVE-5297.5.patch
          19 kB
          Vikram Dixit K
        6. HIVE-5297.6.patch
          19 kB
          Vikram Dixit K
        7. HIVE-5297.7.patch
          26 kB
          Vikram Dixit K
        8. HIVE-5297.8.patch
          26 kB
          Vikram Dixit K

          Activity

            People

            • Assignee:
              vikram.dixit Vikram Dixit K
              Reporter:
              vikram.dixit Vikram Dixit K
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: