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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.4, 0.11.0
    • Component/s: Scrunch
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: