##### Site index · List index
Message view
Top
From "Yan Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1399) Logical Optimizer: Expression optimizor rule
Date Mon, 28 Jun 2010 23:27:50 GMT
```
[ 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
>          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.

```
Mime
View raw message