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

Ryan Blue commented on PIG-4953:
--------------------------------

[~daijy], can you take a look at this patch?

This fixes the visit method and adds tests for predicate push-down. I noticed 
that the tests added with PIG-4940 were for partition push-down, not predicate. 
I copied the test file and modified it to use 
{{PredicatePushDownFilterExtractor}}. I also added a test for PIG-4940 and for 
this. The successful case caught an additional problem: the fix for PIG-4940 
didn't remove the residual filters that accumulate on the filter plan when the 
entire unary expression is going to be added to the filter plan isntead. I 
fixed this case and the tests are passing. I'd appreciate it if the reviewers 
could check that I got the logic right here. I'm not very familiar with how 
residuals are handled and want to make sure this is correct. Thanks!

> Predicate push-down will not run filters for single unary expressions
> ---------------------------------------------------------------------
>
>                 Key: PIG-4953
>                 URL: https://issues.apache.org/jira/browse/PIG-4953
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.15.0
>            Reporter: Ryan Blue
>            Assignee: Ryan Blue
>         Attachments: PIG-4953.1.patch
>
>
> While testing PIG-4940, I noticed that a "is not null" predicate was not 
> pushed down, but equality predicates were. The problem is that the 
> {{FilterExtractor#visit}} method ignores anything that isn't a 
> {{BinaryExpression}}. Pushing down {{UnaryExpression}} filters works if the 
> expression is linked in by a binary expression, like "b is not null and c == 
> 'val'".



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

Reply via email to