From issues-return-221816-archive-asf-public=cust-asf.ponee.io@spark.apache.org Thu May 2 14:22:07 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B578B180671 for ; Thu, 2 May 2019 16:22:06 +0200 (CEST) Received: (qmail 20336 invoked by uid 500); 2 May 2019 14:22:06 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 20327 invoked by uid 99); 2 May 2019 14:22:06 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2019 14:22:06 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7A0AEE2B49 for ; Thu, 2 May 2019 14:22:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2297624597 for ; Thu, 2 May 2019 14:22:00 +0000 (UTC) Date: Thu, 2 May 2019 14:22:00 +0000 (UTC) From: "Dongjoon Hyun (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (SPARK-27607) Improve performance of Row.toString() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-27607?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Dongjoon Hyun resolved SPARK-27607. ----------------------------------- Resolution: Fixed Assignee: Marco Gaido Fix Version/s: 3.0.0 This is resolved via https://github.com/apache/spark/pull/24505 > Improve performance of Row.toString() > ------------------------------------- > > Key: SPARK-27607 > URL: https://issues.apache.org/jira/browse/SPARK-27607 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 2.4.0 > Reporter: Josh Rosen > Assignee: Marco Gaido > Priority: Minor > Fix For: 3.0.0 > > > I have a job which ends up calling=C2=A0{{org.apache.spark.sql.Row.toStri= ng}}=C2=A0on every row in a massive dataset (the reasons for this are sligh= tly odd and it's=C2=A0a bit non-trivial to change the job to avoid this ste= p).=C2=A0 > {{Row.toString}} is implemented by first constructing a WrappedArray cont= aining the Row's values (by calling {{toSeq}}) and then turning that array = into a string with {{mkString}}. We might be able to get a small performanc= e win by pipelining these steps, using an imperative loop to append fields = to a StringBuilder as soon as they're retrieved (thereby cutting out a few = layers of Scala collections indirection). -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org