[
https://issues.apache.org/jira/browse/PIG-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772157#action_12772157
]
Pradeep Kamath commented on PIG-1036:
-------------------------------------
In the unit tests in TestFRJoin, there is a check made for the output tuples
using hasmaps and also using TestHelper.compareBags() - are both required?
In QueryParser.jjt we currently have:
{code}
1974 // in the case of outer joins, only two
| 1975 // inputs are allowed
| 1976 isOuter = (isLeftOuter || isRightOuter || isFullOuter);
| 1977 if(isOuter && gis.size() > 2) {
| 1978 throw new ParseException("(left|right|full) outer joins are
only supported for two inputs");
| 1979 }
{code}
I think left outer join should only be supported for 2 way FR joins - looks
like the code supports >=2 inputs -
{code}
867 // This condition may not reach, as a join has more than
one side
868 if( innerFlags.length >= 2 ) {
869 isLeftOuter = !innerFlags[1];
870 }
{code}
In the code below, TupleFactory.getInstance() can be replaced with
mTupleFactory. Also there should be checks to see if the second input
has a schema and we should rely on that to determine how many nulls are needed.
Left outer join should only be supported for the case
where second input has a schema (assuming we only support 2 way FR join) to be
consistent in all our implementations of left join.
209 Tuple nullTuple =
TupleFactory.getInstance().newTuple(iter.next().get(0).size());
Why is an array of Bags (nullBags) used? should this be nullTuples since what
we really want is just 1 null tuple - also if we only
support 2 way left outer join, this would just be a nullTuple instead of an
array.
> Fragment-replicate left outer join
> ----------------------------------
>
> Key: PIG-1036
> URL: https://issues.apache.org/jira/browse/PIG-1036
> Project: Pig
> Issue Type: New Feature
> Reporter: Olga Natkovich
> Assignee: Ankit Modi
> Attachments: LeftOuterFRJoin.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.