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

ALTER TABLE PARTITION COLUMN does not set partition column comments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.3.0, 2.0.0
    • SQL
    • None

    Description

      ALTER TABLE PARTITION COLUMN does not set partition column comments. The syntax is accepted, but the COMMENT for the column is ignored.

      0: jdbc:hive2://localhost:10000/default> create table part_test(i int comment 'HELLO') partitioned by (j int comment 'WORLD');
      No rows affected (0.104 seconds)
      0: jdbc:hive2://localhost:10000/default> describe part_test;
      +--------------------------+-----------------------+-----------------------+--+
      |         col_name         |       data_type       |        comment        |
      +--------------------------+-----------------------+-----------------------+--+
      | i                        | int                   | HELLO                 |
      | j                        | int                   | WORLD                 |
      |                          | NULL                  | NULL                  |
      | # Partition Information  | NULL                  | NULL                  |
      | # col_name               | data_type             | comment               |
      |                          | NULL                  | NULL                  |
      | j                        | int                   | WORLD                 |
      +--------------------------+-----------------------+-----------------------+--+
      7 rows selected (0.109 seconds)
      0: jdbc:hive2://localhost:10000/default> alter table part_test partition column (j int comment 'WIDE');
      No rows affected (0.121 seconds)
      0: jdbc:hive2://localhost:10000/default> describe part_test;
      +--------------------------+-----------------------+-----------------------+--+
      |         col_name         |       data_type       |        comment        |
      +--------------------------+-----------------------+-----------------------+--+
      | i                        | int                   | HELLO                 |
      | j                        | int                   |                       |
      |                          | NULL                  | NULL                  |
      | # Partition Information  | NULL                  | NULL                  |
      | # col_name               | data_type             | comment               |
      |                          | NULL                  | NULL                  |
      | j                        | int                   |                       |
      +--------------------------+-----------------------+-----------------------+--+
      7 rows selected (0.108 seconds)
      

      Attachments

        1. HIVE-12182.2.patch
          18 kB
          Naveen Gangam
        2. HIVE-12182.3.patch
          18 kB
          Naveen Gangam
        3. HIVE-12182.patch
          1 kB
          Naveen Gangam
        4. HIVE-12182-branch1.txt
          18 kB
          Yongzhi Chen

        Activity

          People

            ngangam Naveen Gangam
            lskuff Lenni Kuff
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: