Hive
  1. Hive
  2. HIVE-2722

GenericUDFUtils.findText use CharBuffer other than ByteBuffer will be better

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: None
    • Component/s: UDF
    • Labels:
    • Environment:

      Linux zongren-VirtualBox 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011 i686 i686 i386 GNU/Linux

      java version "1.6.0_25"

      hadoop-0.20.2-cdh3u0

      hive-0.7.0-cdh3u0

    • Hadoop Flags:
      Reviewed
    • Release Note:
      change ByteBuffer to CharBuffer in GenericUDFUtil.findText

      Description

      select instr("中文字符测试-第一行","-") from testTable limit 1;
      result:19 (one Chinese Character was considered as 3 Unicode bits)

      select substr("中文字符测试-第一行",1,2) from testTable limit 1;
      result: "中文" (one Chinese Character was considered as 1 Unicode Unit )

      instr should considered one chinese character as one Unicode Unit too.

      1. HIVE-2722.patch
        1 kB
        caofangkun
      2. udf_instr_1.q
        1 kB
        caofangkun

        Activity

        caofangkun created issue -
        caofangkun made changes -
        Field Original Value New Value
        Attachment HIVE-2722.patch [ 12510792 ]
        caofangkun made changes -
        Attachment udf_instr_1.q [ 12510794 ]
        caofangkun made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags Reviewed [ 10343 ]
        Release Note change ByteBuffer to CharBuffer in GenericUDFUtil.findText
        caofangkun made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ashutosh Chauhan made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ashutosh Chauhan made changes -
        Fix Version/s 0.9.0 [ 12317742 ]
        Affects Version/s 0.9.0 [ 12317742 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            caofangkun
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development