tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyunsik Choi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAJO-342) Implement strpos(string, substring) function
Date Mon, 02 Dec 2013 01:32:35 GMT

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

Hyunsik Choi commented on TAJO-342:
-----------------------------------

In many cases, dealing with characters as a binary array would be useful for users. So, I
suggest you to rename the current function to strposb (with 'b' suffix) and to create a new
function strpos that deals with data as characters.

For other functions, we could use 'b' suffix for clearly specifying binary functions.

> Implement strpos(string, substring) function
> --------------------------------------------
>
>                 Key: TAJO-342
>                 URL: https://issues.apache.org/jira/browse/TAJO-342
>             Project: Tajo
>          Issue Type: New Feature
>          Components: operator/function/udf
>            Reporter: Hyunsik Choi
>            Assignee: hyoungjunkim
>            Priority: Minor
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-342.patch
>
>
> h3. Function Definition
> {code}
> int strpos(string text, substring text)
> {code}
> h3. Description
> This function finds the location of specified substring.
>  * If *string* or *substring* is null, the result should be null.
>  * If *substring* is '', the result should be 1.
>  * If there is no matched *substring*, the result should be 0.
>  * The result is one-based index.
> h3. Example.
> {code}
> hyunsik=> select strpos('tajo','jo');
>  strpos 
> --------
>       3
> (1 row)
> {code}



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

Mime
View raw message