You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Swati Jain <sw...@aggiemail.usu.edu> on 2010/07/20 11:17:03 UTC

Multiple successors

I noticed a number of places in the code where the successors of a
LogicalRelationalOperator is accessed as "op.successors.get(0)". Is it
always the case that logical relational operators (in the new logical
optimizer framework) have only 1 successor? Why dont the rules iterate over
the successors instead of assuming there is a single successor?

An example which shows an LOFilter having multiple successor (correct me if
I am wrong):

A1 = Load(..);
A2 = Load(..);
B = LOFilter(...);
C = LOJoin(A1,B);
D = LOJoin(A2,B);

Thanks!
Swati

Re: Multiple successors

Posted by Daniel Dai <ji...@yahoo-inc.com>.
Hi, Swati,
The only logical operator can have multiple output is LOSplit. So until 
now, it is safe to assume logical operator only have 1 output except for 
LOSplit.

Daniel

Swati Jain wrote:
> I noticed a number of places in the code where the successors of a
> LogicalRelationalOperator is accessed as "op.successors.get(0)". Is it
> always the case that logical relational operators (in the new logical
> optimizer framework) have only 1 successor? Why dont the rules iterate over
> the successors instead of assuming there is a single successor?
>
> An example which shows an LOFilter having multiple successor (correct me if
> I am wrong):
>
> A1 = Load(..);
> A2 = Load(..);
> B = LOFilter(...);
> C = LOJoin(A1,B);
> D = LOJoin(A2,B);
>
> Thanks!
> Swati
>