Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Patch Available
Description
Now that DataBag has an iterator method, it can implement Iterable with no other changes. This would allow bags to be used in a foreach loop like
for(Tuple t : bag) {
// do something with t
}
The attached patch has DataBag implement iterable and converts all bag iterator usages in pig to use foreach loops.