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

Improve to support the multibyte character at lpad and rpad

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • UDF

    Description

      The current lpad and rpad don't support the multibyte character at "str" and "pad".
      For example, we can see the following result.

      hive> select name from sample1;
      OK
      tokyo
      TOKYO
      hive> select lpad(name, 20, '*') from sample1;
      OK
      ***************tokyo
      *****TOKYO
      

      This is improved as follows.

      hive> select lpad(name, 20, '*') from sample1;
      ***************tokyo
      ***************TOKYO
      

      Attachments

        1. HIVE-12372.1.patch
          7 kB
          Shinichi Yamashita
        2. HIVE-12372.2.patch
          7 kB
          Shinichi Yamashita
        3. HIVE-12372.3.patch
          6 kB
          Shinichi Yamashita

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sinchii Shinichi Yamashita Assign to me
            sinchii Shinichi Yamashita
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment