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

SHOW CREATE TABLE does not escape column names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 3.1.0
    • None
    • Frontend
    • None
    • ghx-label-4

    Description

      Create a table that includes a column called `location`. Issue a SHOW CREATE TABLE command for that table. You will get the sql with the name unquoted. Try to execute that statement. You'll get an error:

      Syntax error in line 11:
      location STRING,
      ^
      Encountered: LOCATION
      Expected: DEFAULT, PRIMARY, IDENTIFIER
      

      Reason: LOCATION is a SQL reserved word. The implementation of SHOW CREATE TABLE should escape reserved column names. Using the ToSqlUtils method for that purpose.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Paul.Rogers Paul Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: