[ 
https://issues.apache.org/jira/browse/PIG-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yan Zhou updated PIG-1731:
--------------------------

    Attachment: PIG-1731.patch

The problem is that UserFuncExpression.isEqual checks for the logical plan 
equality before check for the the UDF's equality. This causes an infinite loop 
as the logical plan equality check
requires the equality checks of all its operators of which the 
UserFuncExpression is part.

We had the similar issues on other expression operators before. NotExpression, 
e.g, had the problem fixed in PIG-1510. 

The  UserFuncExpression.isEqual is called by the logicl expression simplifier 
(PIG-1399)  in the new logical plan. At least in this test it is not called if 
the old logical plan is used. That's why use of the old logical plan is ok in 
this test case.

> New Logical Plan: FILTER fails when there are multiple conditions
> -----------------------------------------------------------------
>
>                 Key: PIG-1731
>                 URL: https://issues.apache.org/jira/browse/PIG-1731
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Sherry Chen
>            Assignee: Yan Zhou
>             Fix For: 0.8.0
>
>         Attachments: PIG-1731.patch
>
>
> Following pig script fails:
> ===========
> REGISTER string.jar;
> A = LOAD 'data' USING PigStorage() AS (a0:chararray, a1, a2);
> B = FOREACH A GENERATE a0;
> C = DISTINCT B;
> D = FILTER C BY string.LENGTH(a0) <= 50 AND string.LENGTH(a0) > 1; 
> STORE D INTO 'D';
> ===========
> 2010-11-16 22:11:38,097 [main] INFO  
> org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - 
> pig.usenewlogicalplan is set to true. New logical plan will be used.
> 2010-11-16 22:11:38,202 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 
> 2998: Unhandled internal error. null
> But this one works:
> ===========
> REGISTER string.jar;
> A = LOAD 'data' USING PigStorage() AS (a0:chararray, a1, a2);
> B = FOREACH A GENERATE a0;
> C = DISTINCT B;
> D = FILTER C BY string.LENGTH(a0) <= 50;
> E = FILTER D BY string.LENGTH(a0) > 1; 
> STORE E INTO 'D';
> ===========
> Input data:
> ===========
> Jerry   Jerry   0.55
> Dave    David   0.15
> Danny   Dan     0.015
> S       Smith   0.2
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA        Amy     0.8
> ===========

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

Reply via email to