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

string expressions on a fixed length character do not preserve trailing spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • SQL
    • None

    Description

      When a string expression such as upper or lower is applied to a fixed length column the trailing spaces of the fixed length character are not preserved.

      CREATE TABLE  if not exists TCHAR ( 
      RNUM int, 
      CCHAR char(32)    
      )
      ROW FORMAT DELIMITED 
      FIELDS TERMINATED BY '|' 
      LINES TERMINATED BY '\n' 
      STORED AS TEXTFILE;
      

      cchar as a char(32).

      select cchar, concat(cchar, cchar), concat(lower(cchar), cchar), concat(upper(cchar), cchar) 
      from tchar;
      

      0|\N
      1|
      2|
      3|BB
      4|EE
      5|FF

      Attachments

        Issue Links

          Activity

            People

              aihuaxu Aihua Xu
              the6campbells N Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: