Hive
  1. Hive
  2. HIVE-2888

Creating an external table using the 'LIKE' clause actually creates a managed table.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.1
    • Fix Version/s: 0.8.0
    • Component/s: Metastore
    • Labels:
      None

      Description

      When creating a new table with both the EXTERNAL and LIKE clauses, the new table does not behave as an EXTERNAL table thus resulting in potential data loss.

      Example:
      create external table test1 (VAL string) location '/user/craig/test1';
      create external table test2 like test1 location '/user/craig/test2';
      drop table test1;

      /user/craig/test1 - still exists

      drop table test2;

      /user/craig/test2 - is deleted (bad)

      If I do an extended describe on both tables, test1 shows up as being external while test2 is a managed table.

        Activity

        Hide
        Kai Zhang added a comment -

        This has been fixed in HIVE-2086.

        Show
        Kai Zhang added a comment - This has been fixed in HIVE-2086 .
        Hide
        Ashutosh Chauhan added a comment -

        Fixed in HIVE-2086.

        Show
        Ashutosh Chauhan added a comment - Fixed in HIVE-2086 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Craig Swift
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 12h
              12h
              Remaining:
              Remaining Estimate - 12h
              12h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development