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

show create table creating unusable DDL when some reserved keywords exist

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: CLI
    • Labels:
      None
    • Environment:

      hive 0.11

      Description

      HIVE-701 already makes most reserved keywords available for table/column/partition names and 'show create table' produces usable DDLs.
      However I think it's better if we quote table/column/partition names for the output of 'show create table', which is how mysql works and seems more robust.

      For example, use select as column name will produce unusable DDL:

      create table table_select(`select` string);
      show create table table_select;
      

        Attachments

        1. D13191.1.patch
          8 kB
          Phabricator
        2. HIVE-5407.1.patch
          9 kB
          Zhichun Wu

          Activity

            People

            • Assignee:
              wzc1989 Zhichun Wu
              Reporter:
              wzc1989 Zhichun Wu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: