You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Yan Zhou (JIRA)" <ji...@apache.org> on 2010/06/29 01:27:50 UTC
[jira] Commented: (PIG-1399) Logical Optimizer: Expression
optimizor rule
[ https://issues.apache.org/jira/browse/PIG-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883348#action_12883348 ]
Yan Zhou commented on PIG-1399:
-------------------------------
Other expression optimizations include:
3. Optimization of erasure of logical implicated expression in AND
Example:
B = filter A by (a0 > 5 and a0 > 7);
=> B = filter A by a0 > 7;
4. Optimization of erasure of logical implicated expression in OR
Example:
B = filter A by ((a0 > 5) or (a0 > 6 and a1 > 15);
=> B = filter C by a0 > 5;
A comprehensive example of 2, 3 and 4 optimizations is:
B = filter A by NOT((a0 > 1 and a0 > 0) or (a1 < 3 and a0 >5))";
=> B = filter A by a0 <= 1;
> Logical Optimizer: Expression optimizor rule
> --------------------------------------------
>
> Key: PIG-1399
> URL: https://issues.apache.org/jira/browse/PIG-1399
> Project: Pig
> Issue Type: Sub-task
> Components: impl
> Affects Versions: 0.7.0
> Reporter: Daniel Dai
> Assignee: Yan Zhou
>
> We can optimize expression in several ways:
> 1. Constant pre-calculation
> Example:
> B = filter A by a0 > 5+7;
> => B = filter A by a0 > 12;
> 2. Boolean expression optimization
> Example:
> B = filter A by not (not(a0>5) or a>10);
> => B = filter A by a0>5 and a<=10;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.