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

CREATE TABLE t LIKE some_view should create a new empty base table, but instead creates a copy of view

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.8.0
    • Query Processor
    • None
    • Reviewed
    • In 0.8.0, CREATE TABLE LIKE view_name creates a table by adopting the schema of view_name (fields and partition columns) using defaults for serde and file formats. Before 0.8.0, CREATE TABLE LIKE view_name would make a copy of the view.

    Description

      I think it should copy only the column definitions from the view metadata. Currently it is copying the entire descriptor, resulting in a new view instead of a new base table.

      Attachments

        1. HIVE-1218v0.patch
          17 kB
          Charles Chen
        2. HIVE-1218v2.patch
          23 kB
          Charles Chen
        3. HIVE-1218v3.patch
          41 kB
          Charles Chen
        4. HIVE-1218v4.patch
          19 kB
          Charles Chen
        5. HIVE-1218v5.patch
          37 kB
          Charles Chen
        6. HIVE-1218v6.patch
          37 kB
          Charles Chen
        7. HIVE-1218v7.patch
          37 kB
          Charles Chen
        8. HIVE-1218v8.patch
          37 kB
          Charles Chen

        Issue Links

          Activity

            People

              ccy Charles Chen
              jvs John Sichi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: