Return-Path: X-Original-To: apmail-crunch-dev-archive@www.apache.org Delivered-To: apmail-crunch-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 660AF11055 for ; Mon, 4 Aug 2014 14:29:12 +0000 (UTC) Received: (qmail 34107 invoked by uid 500); 4 Aug 2014 14:29:12 -0000 Delivered-To: apmail-crunch-dev-archive@crunch.apache.org Received: (qmail 34074 invoked by uid 500); 4 Aug 2014 14:29:12 -0000 Mailing-List: contact dev-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@crunch.apache.org Delivered-To: mailing list dev@crunch.apache.org Received: (qmail 34063 invoked by uid 500); 4 Aug 2014 14:29:12 -0000 Delivered-To: apmail-incubator-crunch-dev@incubator.apache.org Received: (qmail 34060 invoked by uid 99); 4 Aug 2014 14:29:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2014 14:29:12 +0000 Date: Mon, 4 Aug 2014 14:29:12 +0000 (UTC) From: "David Whiting (JIRA)" To: crunch-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CRUNCH-454) Replace use of Scala Iterable with TraversableOnce where SingleUseIterable is the concrete type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 David Whiting created CRUNCH-454: ------------------------------------ Summary: Replace use of Scala Iterable with TraversableOnce where SingleUseIterable is the concrete type Key: CRUNCH-454 URL: https://issues.apache.org/jira/browse/CRUNCH-454 Project: Crunch Issue Type: Improvement Components: Scrunch Reporter: David Whiting Priority: Minor 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. -- This message was sent by Atlassian JIRA (v6.2#6252)