Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-198

Support COMMENT clause for CREATE TABLE ... LIKE

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 0.7
    • Impala 0.7
    • None
    • None

    Description

      Please consider supporting the CREATE TABLE ... LIKE usage:

      CREATE TABLE t2 LIKE t1 COMMENT 'Reason for creating this new table.'

      Could be good for usability if many new / empty tables are created and
      nobody knows what they were for.

      Functionality-wise, seems like an easy enhancement.

      If someone is doing trial and error currently with the CREATE TABLE LIKE syntax,
      they can hit a confusing error where it seems like the parser sees the LIKE and
      decides it must be in the middle of a query, expecting keywords that normally occur
      in the WHERE clause:

      [localhost:21000] > create table d2 like t1 comment 'foo';
      ERROR: com.cloudera.impala.common.AnalysisException: Syntax error at:
      create table d2 like t1 comment 'foo'
      ^
      Encountered: COMMENT
      Expected: AS, FULL, GROUP, HAVING, INNER, JOIN, LEFT, LIKE, LIMIT, LOCATION, ON, ORDER, RIGHT, SELECT, UNION, USING, WHERE, PARTITION, COMMA, IDENTIFIER

      Attachments

        Activity

          People

            lskuff Lenni Kuff
            jrussell John Russell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: