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

Disallow create table with dot/colon in column name

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: Parser
    • Labels:

      Description

      Since we don't allow users to query column names with dot in the middle such as emp.no, don't allow users to create tables with such columns that cannot be queried. Fix the documentation to reflect this fix.

      Here is an example. Consider this table:

      CREATE TABLE a (`emp.no` string);
      select `emp.no` from a; fails with this message:
      FAILED: RuntimeException java.lang.RuntimeException: cannot find field emp from [0:emp.no]
      

      The hive documentation needs to be fixed:

       (https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL) seems to  indicate that any Unicode character can go between the backticks in the select statement, but it doesn’t like the dot/colon or even select * when there is a column that has a dot/colon. 
      

        Attachments

        1. HIVE-10120.01.patch
          5 kB
          Pengcheng Xiong
        2. HIVE-10120.02.patch
          5 kB
          Pengcheng Xiong

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              pxiong Pengcheng Xiong Assign to me
              Reporter:
              pxiong Pengcheng Xiong

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment