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

Gianmarco De Francisci Morales commented on PIG-1904:
-----------------------------------------------------

Created PIG-2169 for this.
Anyway given the benefit/cost ratio I wouldn't try to fix it.
A Nondeterministic UDF in a Split is probably better expressed as a Sample.
Anyway I think this simple workaround should work:
{code}
a = LOAD 'a.txt' AS (f1,f2,f3);
b = FOREACH a GENERATE f1, f2, f3, NonDetUDF(f1,f2,f3) AS f4;
SPLIT b INTO c IF f4 < 0.5, D OTHERWISE;
{code}

> Default split destination
> -------------------------
>
>                 Key: PIG-1904
>                 URL: https://issues.apache.org/jira/browse/PIG-1904
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Daniel Dai
>              Labels: gsoc2011
>             Fix For: 0.10
>
>         Attachments: PIG-1904.1.patch
>
>
> "split" statement is better to have a default destination, eg:
> {code}
> SPLIT A INTO X IF f1<7, Y IF f2==5, Z IF (f3<6 OR f3>6), OTHER otherwise; -- 
> OTHERS has all tuples with f1>=7 && f2!=5 && f3==6
> {code}
> This is a candidate project for Google summer of code 2011. More information 
> about the program can be found at http://wiki.apache.org/pig/GSoc2011

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to