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

Thejas M Nair commented on PIG-2135:
------------------------------------

Vivek,
I am unable to reproduce this issue with 0.9, can you please check if the 
example in jira description is correct ?


grunt> register filudfs.jar
grunt> a = load 'sample_input' using PigStorage(',') as 
(q:chararray,w:chararray);
grunt> b = filter a by org.udfs.Func09('f1',q) == 1 AND org.udfs.Func09('e',w) 
== 1 ;
grunt> dump b;
(f1,e) 
grunt> 


Both expressions are also there in explain plain - 
#--------------------------------------------------
# Map Reduce Plan                                  
#--------------------------------------------------
MapReduce node scope-43
Map Plan
b: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-42
|
|---b: Filter[bag] - scope-30
    |   |
    |   And[boolean] - scope-41
    |   |
    |   |---Equal To[boolean] - scope-35
    |   |   |
    |   |   |---POUserFunc(org.udfs.Func09)[int] - scope-33
    |   |   |   |
    |   |   |   |---Constant(f1) - scope-31
    |   |   |   |
    |   |   |   |---Project[chararray][0] - scope-32
    |   |   |
    |   |   |---Constant(1) - scope-34
    |   |
    |   |---Equal To[boolean] - scope-40
    |       |
    |       |---POUserFunc(org.udfs.Func09)[int] - scope-38
    |       |   |
    |       |   |---Constant(e) - scope-36
    |       |   |
    |       |   |---Project[chararray][1] - scope-37
    |       |
    |       |---Constant(1) - scope-39
    |
    |---a: New For Each(false,false)[bag] - scope-29
        |   |
        |   Cast[chararray] - scope-24
        |   |
        |   |---Project[bytearray][0] - scope-23
        |   |
        |   Cast[chararray] - scope-27
        |   |
        |   |---Project[bytearray][1] - scope-26
        |
        |---a: 
Load(hdfs://cobaltblue-nn1.blue.ygrid.yahoo.com/user/tejas/sample_input:PigStorage(','))
 - scope-22--------
Global sort: false
----------------


> Pig 0.9 ignoring Multiple filter conditions joined with AND/OR 
> ---------------------------------------------------------------
>
>                 Key: PIG-2135
>                 URL: https://issues.apache.org/jira/browse/PIG-2135
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>            Assignee: Thejas M Nair
>            Priority: Critical
>             Fix For: 0.9.0
>
>
> When I have multiple filter statements joined by AND/OR , except for the 
> first condition all other conditions are ignored.
> For example in the below script the second condition (org.udfs.Func09('e',w) 
> == 1) is ignored ;
> a = load 'sample_input' using PigStorage(',')  as (q:chararray,w:chararray);
> b = filter a by org.udfs.Func09('f1',q) == 1  AND  org.udfs.Func09('e',w) == 
> 1 ;
> dump b;
> Output from the script
> (f1,a)
> (f1,e)  --> this record should have been filtered by the second condition
> Input for the script;
> f1,a
> f2,b
> f3,c
> f1,e
> f2,f
> f5,e
> The explain of the alias b shows that the second condition is not included in 
> the plan itself.
> The above statements works fine with Pig 0.8.

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

        

Reply via email to