[
https://issues.apache.org/jira/browse/PIG-4940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan Blue updated PIG-4940:
---------------------------
Attachment: PIG-4940.2.patch
Adding a test for this, testUnSupportedFieldsWithUnaryExpression, in the Orc
push-down suite. The case demonstrates that "not browser#'type' is null" is not
pushed down. The testNot and testAndOr cases already verify that the "is null"
predicate (and the negated form) works when the column is not a map access and
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
> Assignee: Ryan Blue
> Attachments: PIG-4940.1.patch, PIG-4940.2.patch
>
>
> 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)