[ 
https://issues.apache.org/jira/browse/PIG-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thejas M Nair updated PIG-1742:
-------------------------------

    Description: 
Rule.java which is used for finding patterns in the logical plan during logical 
plan optimization does not work with patterns where the leaves/sinks in the 
patter are not siblings.

For eg, it will not work with a pattern such as  -
{code}
A->B
|-> C -> D
In this example, B and D are leaves, but not siblings.
{code}

In org.apache.pig.newplan.optimizer.Rule.java, the code in the for loop at line 
138 (in this revision - 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/newplan/optimizer/Rule.java?annotate=1005230)
 checks if the leaves in the pattern are are sibling of the node that matched. 
This is an undocumented limitation. Note that none of the existing logical plan 
optimization rules have such a patter, so this issue does not have any impact 
on the user.

  was:
Rule.java which is used for finding patterns in the logical plan during logical 
plan optimization does not work with patterns where the leaves/sinks in the 
patter are not siblings.

For eg, it will not work with a pattern such as  -
A->B
|-> C -> D
In this example, B and D are leaves, but not siblings.


In org.apache.pig.newplan.optimizer.Rule.java, the code in the for loop at line 
138 (in this revision - 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/newplan/optimizer/Rule.java?annotate=1005230)
 checks if the leaves in the pattern are are sibling of the node that matched. 
This is an undocumented limitation. Note that none of the existing logical plan 
optimization rules have such a patter, so this issue does not have any impact 
on the user.


> org.apache.pig.newplan.optimizer.Rule.java does not work with plan patterns 
> where leaves/sinks are not siblings
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-1742
>                 URL: https://issues.apache.org/jira/browse/PIG-1742
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Thejas M Nair
>             Fix For: 0.9.0
>
>
> Rule.java which is used for finding patterns in the logical plan during 
> logical plan optimization does not work with patterns where the leaves/sinks 
> in the patter are not siblings.
> For eg, it will not work with a pattern such as  -
> {code}
> A->B
> |-> C -> D
> In this example, B and D are leaves, but not siblings.
> {code}
> In org.apache.pig.newplan.optimizer.Rule.java, the code in the for loop at 
> line 138 (in this revision - 
> http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/newplan/optimizer/Rule.java?annotate=1005230)
>  checks if the leaves in the pattern are are sibling of the node that 
> matched. This is an undocumented limitation. Note that none of the existing 
> logical plan optimization rules have such a patter, so this issue does not 
> have any impact on the user.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to