Hive
  1. Hive
  2. HIVE-1054

"CHANGE COLUMN" does not support changing partition column types.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Activity

      Hide
      He Yongqiang added a comment -

      Right now, it seems hive meta data does not support alter partition keys. I am getting "Invalid alter operation: partition keys can not be changed."

      Show
      He Yongqiang added a comment - Right now, it seems hive meta data does not support alter partition keys. I am getting "Invalid alter operation: partition keys can not be changed."
      Hide
      He Yongqiang added a comment -

      Talked with Prasad today, this should not be supported.

      Show
      He Yongqiang added a comment - Talked with Prasad today, this should not be supported.
      Hide
      Kevin Wilfong added a comment -

      Yongqiang, could you comment on why this should not be supported?

      Show
      Kevin Wilfong added a comment - Yongqiang, could you comment on why this should not be supported?
      Hide
      Ashutosh Chauhan added a comment -

      I think problem there is what will happen to existing partitions? One has to come up for the convention of how does adding / dropping of column maps to dir structure on hdfs and then possibly need to move around/rename partition dirs to match with this convention.

      Show
      Ashutosh Chauhan added a comment - I think problem there is what will happen to existing partitions? One has to come up for the convention of how does adding / dropping of column maps to dir structure on hdfs and then possibly need to move around/rename partition dirs to match with this convention.
      Hide
      Kevin Wilfong added a comment -

      @Ashutosh

      What if we only allow changing the type of a partition column?

      I agree adding/dropping/renaming partition columns has a host of difficulties to manage, but I thought changing a partition column's type shouldn't involve a change in hdfs, simply a metadata change.

      Show
      Kevin Wilfong added a comment - @Ashutosh What if we only allow changing the type of a partition column? I agree adding/dropping/renaming partition columns has a host of difficulties to manage, but I thought changing a partition column's type shouldn't involve a change in hdfs, simply a metadata change.
      Hide
      Ashutosh Chauhan added a comment -

      One problem there could be that all partition values are stored as string, so type info is completely lost in mysql. As a result partition filters cannot be pushed in mysql for any types other then string. This is also documented in listPartitionsByFilter() api of metastoreclient. Though, I don't find that this is enforced anywhere (that might itself be a bug). As a result, changing a type of partition column from string to int or vice-versa might result in change in behavior.

      Show
      Ashutosh Chauhan added a comment - One problem there could be that all partition values are stored as string, so type info is completely lost in mysql. As a result partition filters cannot be pushed in mysql for any types other then string. This is also documented in listPartitionsByFilter() api of metastoreclient. Though, I don't find that this is enforced anywhere (that might itself be a bug). As a result, changing a type of partition column from string to int or vice-versa might result in change in behavior.

        People

        • Assignee:
          Unassigned
          Reporter:
          He Yongqiang
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development