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/12/06 06:09:35 UTC
[jira] [Assigned] (TAJO-343) Implement locate function
[ https://issues.apache.org/jira/browse/TAJO-343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyunsik Choi reassigned TAJO-343:
---------------------------------
Assignee: KyoungBok Lee
I just added you to a contributor group, and I just assigned this issue to you. Thank you for your participation.
> Implement locate function
> -------------------------
>
> Key: TAJO-343
> URL: https://issues.apache.org/jira/browse/TAJO-343
> Project: Tajo
> Issue Type: New Feature
> Components: operator/function/udf
> Reporter: Hyunsik Choi
> Assignee: KyoungBok Lee
> Priority: Minor
> Fix For: 0.8-incubating
>
>
> h3. Function definition
> {code}
> int4 locate(string text, substr text, [, pos])
> {code}
> h3. Description
> Returns the position of the first occurance of substr in str after position pos
> * The result is one-based index.
> * If string or substr is null, the result should be null.
> * *pos* is one-based index.
> * *pos* cannot be a negative integer.
> * If 0 is given to *pos*, the function considers that pos is 1.
> * If there is no pos, the function considers that pos is 1.
> * If there is no matched substring, the result should be 0.
> h3. Example
> {code}
> SELECT locate('foobarbar', 'bar',5);
> -> 7
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)