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

length(CHAR) doesn't consider trailing space

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 4.0.0
    • Component/s: UDF
    • Labels:
      None

      Description

      Reproduce steps:

      create table test(a char(2), b varchar(2));
      insert into test values('L ', 'L ');
      select length(a),length(b) from test;
      +------+------+
      | _c0  | _c1  |
      +------+------+
      | 1    | 2    |
      +------+------+
      1 row selected (0.185 seconds)
      

      Here char with trailing spaces are trimmed, whereas leading spaces are not trimmed.

        Attachments

        1. HIVE-20520.01.patch
          19 kB
          Jesus Camacho Rodriguez
        2. HIVE-20520.02.patch
          24 kB
          Jesus Camacho Rodriguez
        3. HIVE-20520.02.patch
          24 kB
          Jesus Camacho Rodriguez
        4. HIVE-20520.02.patch
          24 kB
          Jesus Camacho Rodriguez
        5. HIVE-20520.patch
          9 kB
          Jesus Camacho Rodriguez

        Issue Links

          Activity

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

            People

            • Assignee:
              jcamachorodriguez Jesus Camacho Rodriguez Assign to me
              Reporter:
              nareshpr Naresh P R

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment