Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-56

implement Iterable<Tuple> in DataBag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.1.0
    • 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.

      Attachments

        1. iterable_databag.patch
          7 kB
          Charlie Groves

        Activity

          People

            groves Charlie Groves
            groves Charlie Groves
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: