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

exception alter a int typed column to date/datetime/timestamp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      As fas as i know, time types can only be used in partitions, normal columns is not allowed to be set as those types . But it's found can alter a no time types column to date/datetime/timestamp,but exceptions will be throwed when describing.

      hive> create table pokes(foo int, bar string);
      OK
      Time taken: 0.894 seconds
      hive> alter table pokes replace columns(foo date, bar string);
      OK
      Time taken: 0.266 seconds

      hive> describe pokes;
      FAILED: Error in metadata: MetaException(message:java.lang.IllegalArgumentException Error: type expected at the position 0 of 'date:string' but 'date' is found.)
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              coderplay Min Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: