Hive
  1. Hive
  2. HIVE-5685

partition column type validation doesn't work in some cases

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      It seems like it works if there's more than one partition column, and doesn't work if there's just one. At least that's the case that I found. The situation for different types is the same.

      hive> create table zzz(c string) partitioned by (i int);
      OK
      Time taken: 0.41 seconds
      hive> alter table zzz add partition (i='foo');
      OK
      Time taken: 0.185 seconds
      hive> create table zzzz(c string) partitioned by (i int,j int); 
      OK
      Time taken: 0.085 seconds
      hive> alter table zzzz add partition (i='foo',j=5);            
      FAILED: SemanticException [Error 10248]: Cannot add partition column i of type string as it cannot be converted to type int
      hive> alter table zzzz add partition (i=5,j='foo');
      FAILED: SemanticException [Error 10248]: Cannot add partition column j of type string as it cannot be converted to type int
      
      1. HIVE-5685.5.patch
        2 kB
        Vikram Dixit K
      2. HIVE-5685.4.patch
        2 kB
        Vikram Dixit K
      3. HIVE-5685.3.patch
        2 kB
        Vikram Dixit K
      4. HIVE-5685.2.patch
        2 kB
        Vikram Dixit K
      5. HIVE-5685.1.patch
        2 kB
        Vikram Dixit K

        Activity

          People

          • Assignee:
            Vikram Dixit K
            Reporter:
            Sergey Shelukhin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development