Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4033

ALTER TABLE ADD PARTITION treats string-partition key values as case insensitive.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.5.0, Impala 2.6.0, Impala 2.7.0
    • Fix Version/s: Impala 2.9.0
    • Component/s: Frontend
    • Labels:

      Description

      Partition-key values should be treated no different than regular data values, so string partition-key values should be case sensitive.

      However, in ALTER TABLE ADD PARTITION, Impala treats string partition-key values as case insensitive.

      Repro:

      create table t (c int) partitioned by (p string);
      alter table t add partition (p="abc");
      alter table t add partition (p="ABC");
      ERROR: AnalysisException: Partition spec already exists: (p='ABC').
      

      Creating the same partition via static or dynamic insert works finr:

      insert into t partition(p="ABC") values(1);
      insert into t partition(p) values(1, "aBc");
      show partitions t;
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      | p     | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | Location                                      |
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      | ABC   | -1    | 1      | 2B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://localhost:20500/test-warehouse/t/p=ABC |
      | aBc   | -1    | 1      | 2B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://localhost:20500/test-warehouse/t/p=aBc |
      | abc   | -1    | 0      | 0B   | NOT CACHED   | NOT CACHED        | TEXT   | false             | hdfs://localhost:20500/test-warehouse/t/p=abc |
      | Total | -1    | 2      | 4B   | 0B           |                   |        |                   |                                               |
      +-------+-------+--------+------+--------------+-------------------+--------+-------------------+-----------------------------------------------+
      

        Activity

        Hide
        alex.behm Alexander Behm added a comment -

        commit 1df8d311257bbe0a2621f539e61fea714c4c8ff0
        Author: Amos Bird <amosbird@gmail.com>
        Date: Fri Dec 16 14:23:22 2016 +0800

        IMPALA-4033: Treat string-partition key values as case sensitive.

        This commit makes ADD PARTITION operations treat string partition-key
        values as case sensitive in consistent with other related partition DDL
        operations.

        Change-Id: I6fbe67d99df8a50a16a18456fde85d03d622c7a1

        Show
        alex.behm Alexander Behm added a comment - commit 1df8d311257bbe0a2621f539e61fea714c4c8ff0 Author: Amos Bird <amosbird@gmail.com> Date: Fri Dec 16 14:23:22 2016 +0800 IMPALA-4033 : Treat string-partition key values as case sensitive. This commit makes ADD PARTITION operations treat string partition-key values as case sensitive in consistent with other related partition DDL operations. Change-Id: I6fbe67d99df8a50a16a18456fde85d03d622c7a1
        Hide
        jbapple Jim Apple added a comment -

        This is a bulk comment on all issues with Fix Version 2.8.0 that were resolved on or after 2016-12-09.

        2.8.0 was branched on December 9, with only two changes to master cherry-picked to the 2.8.0 release branch after that:

        https://github.com/apache/incubator-impala/commits/2.8.0

        Issues fixed after December 9 might not be fixed in 2.8.0. If you are the one who marked this issue Resolved, can you check to see if the patch is in 2.8.0 by using the link above? If the patch is not in 2.8.0, can you change the Fix Version to 2.9.0?

        Thank you!

        Show
        jbapple Jim Apple added a comment - This is a bulk comment on all issues with Fix Version 2.8.0 that were resolved on or after 2016-12-09. 2.8.0 was branched on December 9, with only two changes to master cherry-picked to the 2.8.0 release branch after that: https://github.com/apache/incubator-impala/commits/2.8.0 Issues fixed after December 9 might not be fixed in 2.8.0. If you are the one who marked this issue Resolved, can you check to see if the patch is in 2.8.0 by using the link above? If the patch is not in 2.8.0, can you change the Fix Version to 2.9.0? Thank you!

          People

          • Assignee:
            amosbird Amos Bird
            Reporter:
            alex.behm Alexander Behm
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development