Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-454

Replace use of Scala Iterable with TraversableOnce where SingleUseIterable is the concrete type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.8.4, 0.11.0
    • Scrunch
    • None

    Description

      The Scrunch version of combine accepts a function Iterable[V] => V . This causes a lot of unexpected behaviour because the iterable that is wrapped is actually a SingleUseIterable, and much of Scala's collection function implementations actually try and access the underlying iterator multiple times if they know that it's possible.

      The fix implemented here is to call iterator() on the underlying SingleUseIterable and expose it instead as a TraversableOnce.

      Attachments

        Activity

          People

            Unassigned Unassigned
            davw David Whiting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: