You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2011/03/25 02:37:05 UTC

[jira] [Commented] (PIG-1935) New logical plan: Should not push up filter in front of Bincond

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

Daniel Dai commented on PIG-1935:
---------------------------------

It fail because we erroneous push filter above foreach. In BinCond case, we shall disable that by setting a new uid for BinCond output.

> New logical plan: Should not push up filter in front of Bincond
> ---------------------------------------------------------------
>
>                 Key: PIG-1935
>                 URL: https://issues.apache.org/jira/browse/PIG-1935
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.8.0
>
>
> The following script produce wrong result:
> {code}
> data = LOAD 'data.txt' using PigStorage() as (referrer:chararray, canonical_url:chararray, ip:chararray);
> best_url = FOREACH data GENERATE ((canonical_url != '' and canonical_url is not null) ? canonical_url : referrer) AS url, ip;
> filtered = FILTER best_url BY url == 'badsite.com';
> dump filtered;
> {code}
> data.txt:
> badsite.com             127.0.0.1
> goodsite.com/1?foo=true goodsite.com    127.0.0.1
> Expected:
> (badsite.com,127.0.0.1)
> We get nothing.
> Thanks Corbin Hoenes for reporting.

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