Skip to content

Commit

Permalink
[SPARK-21477][SQL][MINOR] Mark LocalTableScanExec's input data transient
Browse files Browse the repository at this point in the history
## 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 <[email protected]>

Closes #18686 from gatorsmile/LocalTableScanExec.
  • Loading branch information
gatorsmile authored and cloud-fan committed Jul 20, 2017
1 parent 5b61cc6 commit 256358f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 256358f

Please sign in to comment.