[
https://issues.apache.org/jira/browse/PIG-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yan Zhou updated PIG-1399:
--------------------------
Status: Patch Available (was: Open)
Release Note:
This logical simplification contains the following types of simplifications:
1) Constant pre-calculation
Example:
B = filter A by a0 > 5+7;
is simplified to
B = filter A by a0 > 12;
2) Elimination of negations
Example:
B = filter A by not (not(a0>5) or a>10);
is simplified to
B = filter A by a0>5 and a<=10;
3) Elimination of logical implied expression in AND
Example:
B = filter A by (a0 > 5 and a0 > 7);
is simplified to
B = filter A by a0 > 7;
4) Elimination of logical implied expression in OR
Example:
B = filter A by ((a0 > 5) or (a0 > 6 and a1 > 15);
is simplified to
B = filter C by a0 > 5;
5) Equivalence elimination
Example:
B = filter A by (a0 > 5 and a0 > 5);
is simplified to
B = filter A by a0 > 5;
6) Elimination of complementary expressions in OR
Example:
B = filter A by (a0 > 5 OR a0 <= 5);
is simplified to non-filtering
7) Elimination of naive TRUE expression
Example:
B = filter A by 1==1;
is simplified to non-filtering
> 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
> Fix For: 0.8.0
>
> Attachments: newPatchFindbugsWarnings.html, PIG-1399.patch,
> PIG-1399.patch, PIG-1399.patch, PIG-1399.patch, PIG-1399.patch,
> PIG-1399.patch, PIG-1399.patch
>
>
> 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.