You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tajo.apache.org by "Hyunsik Choi (JIRA)" <ji...@apache.org> on 2013/11/30 07:00:36 UTC

[jira] [Commented] (TAJO-207) Implement bit_length(string) function

    [ https://issues.apache.org/jira/browse/TAJO-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835624#comment-13835624 ] 

Hyunsik Choi commented on TAJO-207:
-----------------------------------

First of all, thank you for your participation.

In overall, the patch looks good to me. But, we need to use datum.asByteArray() instead of datum.asChars() because *datum.asChars().length()* just counts a multiple bytes character as 1. In contrast, we need bit length.
{code}
return DatumFactory.createInt4(datum.asChars().length()*8);
{code}




> Implement bit_length(string) function
> -------------------------------------
>
>                 Key: TAJO-207
>                 URL: https://issues.apache.org/jira/browse/TAJO-207
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: operator/function/udf
>            Reporter: Hyunsik Choi
>            Assignee: DaeMyung Kang
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-207.patch
>
>
> See the title.



--
This message was sent by Atlassian JIRA
(v6.1#6144)