Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 76DFE200CCB for ; Thu, 20 Jul 2017 13:16:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7568416B169; Thu, 20 Jul 2017 11:16:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BA50516B165 for ; Thu, 20 Jul 2017 13:16:36 +0200 (CEST) Received: (qmail 66734 invoked by uid 500); 20 Jul 2017 11:16:35 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 66725 invoked by uid 99); 20 Jul 2017 11:16:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2017 11:16:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9A82BDFCC1; Thu, 20 Jul 2017 11:16:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wenchen@apache.org To: commits@spark.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [SPARK-21477][SQL][MINOR] Mark LocalTableScanExec's input data transient Date: Thu, 20 Jul 2017 11:16:35 +0000 (UTC) archived-at: Thu, 20 Jul 2017 11:16:37 -0000 Repository: spark Updated Branches: refs/heads/master 5b61cc6d6 -> 256358f66 [SPARK-21477][SQL][MINOR] Mark LocalTableScanExec's input data transient ## What changes were proposed in this pull request? This PR is to mark the parameter `rows` and `unsafeRow` of LocalTableScanExec transient. It can avoid serializing the unneeded objects. ## How was this patch tested? N/A Author: gatorsmile Closes #18686 from gatorsmile/LocalTableScanExec. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/256358f6 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/256358f6 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/256358f6 Branch: refs/heads/master Commit: 256358f66a975aa62eb81378e4e073fc2d15644b Parents: 5b61cc6 Author: gatorsmile Authored: Thu Jul 20 19:16:26 2017 +0800 Committer: Wenchen Fan Committed: Thu Jul 20 19:16:26 2017 +0800 ---------------------------------------------------------------------- .../org/apache/spark/sql/execution/LocalTableScanExec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/256358f6/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala index 19c68c1..514ad70 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala @@ -28,12 +28,12 @@ import org.apache.spark.sql.execution.metric.SQLMetrics */ case class LocalTableScanExec( output: Seq[Attribute], - rows: Seq[InternalRow]) extends LeafExecNode { + @transient rows: Seq[InternalRow]) extends LeafExecNode { override lazy val metrics = Map( "numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output rows")) - private lazy val unsafeRows: Array[InternalRow] = { + @transient private lazy val unsafeRows: Array[InternalRow] = { if (rows.isEmpty) { Array.empty } else { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org