Hive
  1. Hive
  2. HIVE-3309

drop partition doesnot work for mixture of string and non-string columns for non-equality operatior

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.9.1, 0.10.0
    • Fix Version/s: None
    • Component/s: Metastore, Query Processor
    • Labels:
    • Environment:

      SuSE 11 SP 1
      Hadoop Cluster + Hive

      Description

      There is still problem in "drop partition" columns if the partition columns are mixture of string and non-string.

      There is behavioural change after fixing HIVE-3063.
      Before fix
      ==========
      create table ptestfilter (a string, b int) partitioned by (c string, d int);
      alter table ptestfilter add partition (c='1', d=2);
      alter table ptestFilter add partition (c='2', d=1);
      alter table ptestfilter drop partition (c<'2'); //this will execute fine

      After fix
      ==========
      create table ptestfilter (a string, b int) partitioned by (c string, d int);
      alter table ptestfilter add partition (c='1', d=2);
      alter table ptestFilter add partition (c='2', d=1);
      alter table ptestfilter drop partition (c<'2'); //this will fail to execute.

      1. HIVE-3309.patch
        3 kB
        Rohith
      2. HIVE-3309.patch
        1 kB
        Rohith

        Activity

        Hide
        Chinna Rao Lalam added a comment -

        Patch is not ready for review. Pls submit patch when it is ready for review.

        Show
        Chinna Rao Lalam added a comment - Patch is not ready for review. Pls submit patch when it is ready for review.
        Hide
        Rohith added a comment -

        I am submitting patch with initial thoughts.Please review the patch.
        I will submit actual patch with test if current idea is accepted.

        Show
        Rohith added a comment - I am submitting patch with initial thoughts.Please review the patch. I will submit actual patch with test if current idea is accepted.
        Hide
        Rohith added a comment -

        If the query contains partition column of type only string , then non-equality operator throw exception.
        Example :
        1. create table ptestfilter (a string, b int) partitioned by (c string, d int);
        2. alter table ptestfilter add partition (c='1', d=1);
        3. alter table ptestfilter drop partition (c<'2');

        In above example, line-3 throws exception. But expected is query should drop partition columns which are less then 2.

        Show
        Rohith added a comment - If the query contains partition column of type only string , then non-equality operator throw exception. Example : 1. create table ptestfilter (a string, b int) partitioned by (c string, d int); 2. alter table ptestfilter add partition (c='1', d=1); 3. alter table ptestfilter drop partition (c<'2'); In above example, line-3 throws exception. But expected is query should drop partition columns which are less then 2.
        Hide
        Rohith added a comment -

        Which version of Hive are you using.?

        I am using brahcn-0.9.1. HIVE-3076 is merged to this branch.

        Show
        Rohith added a comment - Which version of Hive are you using.? I am using brahcn-0.9.1. HIVE-3076 is merged to this branch.
        Hide
        Ashutosh Chauhan added a comment -

        Which version of Hive are you using. This is supposedly fixed via HIVE-3076 Can you try with trunk?

        Show
        Ashutosh Chauhan added a comment - Which version of Hive are you using. This is supposedly fixed via HIVE-3076 Can you try with trunk?

          People

          • Assignee:
            Unassigned
            Reporter:
            Rohith
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development