You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Dmitriy V. Ryaboy (JIRA)" <ji...@apache.org> on 2010/08/25 02:23:16 UTC

[jira] Commented: (PIG-1563) SUBSTRING function is broken

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

Dmitriy V. Ryaboy commented on PIG-1563:
----------------------------------------

Interesting -- this is a casting issue. If you specify name:chararray, it works. The log should be full of class cast exceptions..
Two ways to fix -- take out the classCast catch clause, or (better) write a BinSubstring EvalFunc that can do the conversions appropriately.

> SUBSTRING function is broken
> ----------------------------
>
>                 Key: PIG-1563
>                 URL: https://issues.apache.org/jira/browse/PIG-1563
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Olga Natkovich
>            Assignee: Yan Zhou
>             Fix For: 0.8.0
>
>
> 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.