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

ASF GitHub Bot commented on PIG-4940:
-------------------------------------

GitHub user rdblue opened a pull request:

    https://github.com/apache/pig/pull/25

    PIG-4940: Fix predicate push-down Unary expressions.

    Rather than assuming any child expression of `IsNullExpression` and
    `NotExpression` can be pushed down, this calls `checkPushDown` on the child
    and will push the entire expression if and only if the entire child can
    be pushed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rdblue/pig PIG-4940-unary-expression-push-down

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/pig/pull/25.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit 0b23e3af0d6432a3736e7101f6fdea20b03382cc
Author: Ryan Blue <b...@apache.org>
Date:   2016-06-28T19:02:28Z

    PIG-4940: Fix predicate push-down Unary expressions.
    
    Rather than assuming any child expression of IsNullExpression and
    NotExpression can be pushed down, this calls checkPushDown on the child
    and will push the entire expression if and only if the entire child can
    be pushed.

----


> Predicate push-down filtering unary expressions can be pushed.
> --------------------------------------------------------------
>
>                 Key: PIG-4940
>                 URL: https://issues.apache.org/jira/browse/PIG-4940
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Ryan Blue
>
> While testing predicate push-down, I ran into the following error:
> {code:title=Pig Exception}
> ERROR 0: Unsupported conversion of LogicalExpression to Expression: Map
>         at 
> org.apache.pig.newplan.FilterExtractor.getExpression(FilterExtractor.java:389)
>         at 
> org.apache.pig.newplan.FilterExtractor.getExpression(FilterExtractor.java:401)
>         at 
> org.apache.pig.newplan.FilterExtractor.getExpression(FilterExtractor.java:378)
>         at 
> org.apache.pig.newplan.FilterExtractor.getExpression(FilterExtractor.java:401)
>         at 
> org.apache.pig.newplan.FilterExtractor.getExpression(FilterExtractor.java:380)
>         at 
> org.apache.pig.newplan.FilterExtractor.visit(FilterExtractor.java:109)
>         at 
> org.apache.pig.newplan.PredicatePushDownFilterExtractor.visit(PredicatePushDownFilterExtractor.java:70)
>         at 
> org.apache.pig.newplan.logical.rules.PredicatePushdownOptimizer$PredicatePushDownTransformer.transform(PredicatePushdownOptimizer.java:146)
>         at 
> org.apache.pig.newplan.optimizer.PlanOptimizer.optimize(PlanOptimizer.java:110)
>         ... 19 more
> {code}
> The problem is that the code is trying to push a map access operation, that 
> isn't supported. The cause appears to be the logic in 
> {{checkPushDown(UnaryExpression)}} that separates expressions that can be 
> pushed from expressions that must be run by Pig. This function assumes that 
> any expression under {{IsNullExpression}} or {{NotExpression}} can be pushed 
> and adds the unary node's child expression to the pushdown expression without 
> calling {{checkPushDown}} on it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to