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

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

bq. Thejas can you add an example of what this breaks to the ticket? 
If ND_FUNC is a non deterministic EvalFunc, then the following optimization 
that would be done by LogicalExpressionSimplifier is not correct -
{code}
f = filter l by ND_FUNC(a) > 0.1 and ND_FUNC(a) > 0.1;
=>
f = filter l by ND_FUNC(a) > 0.1 ;
{code}

bq. Does the rule only affect 0.10 or is this also in 8 and 9?
It affects 8 and 9 as well. I will apply the fix to 0.9 as well.

> LogicalExpressionSimplifier optimizer rule should check if udf is 
> deterministic while checking if they are equal
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-2139
>                 URL: https://issues.apache.org/jira/browse/PIG-2139
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>             Fix For: 0.10
>
>
> LogicalExpressionSimplifier simplifies filter expressions. In the process, it 
> compares udfs to see if they are 'equal' (ie expected to produce same 
> results). But it does not check if the udfs are annotated as 
> @Nondeterministic. If such an annotation exists, then the udfs should not be 
> considered equal. UserFuncition.isEqual() is being used to compare the udfs.

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

        

Reply via email to