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

Improve to support the multibyte character at lpad and rpad

    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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: