hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olga Natkovich (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1563) SUBSTRING function is broken
Date Fri, 27 Aug 2010 20:03:54 GMT

    [ https://issues.apache.org/jira/browse/PIG-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903578#action_12903578
] 

Olga Natkovich commented on PIG-1563:
-------------------------------------

I was able to make it successfully working (without wrapping) for the functions that have
fixed number of arguments:

LAST_INDEX_OF
REPLACE
TRIM

I don't believe there is currently a way to make it work with variable number of args (even
if the number of combinations is fixed.) Moreover, if we add the mapping table in this case,
it breaks the case of typed data which is bad. This is the case with the remaining functions
- INDEXOF and SPLIT.

So my suggestion is only to fix the first set of function and delay the rest to 0.9 when we
fix the mapping code.

Dmitry and others, are you ok with this? If so, I can update the patch to reflect this.




> SUBSTRING function is broken
> ----------------------------
>
>                 Key: PIG-1563
>                 URL: https://issues.apache.org/jira/browse/PIG-1563
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Olga Natkovich
>            Assignee: Dmitriy V. Ryaboy
>             Fix For: 0.8.0
>
>         Attachments: PIG_1563.patch
>
>
> Script:
> A = load 'studenttab10k' as (name, age, gpa);
> C = foreach A generate SUBSTRING(name, 0,5);
> E = limit C 10;
> dump E;
> Output is always empty:
> ()
> ()
> ()
> ()
> ()
> ()
> ()
> ()
> ()
> ()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message