Skip to content

Commit ac1eee8

Browse files
committed
output unsafe row
1 parent 5697627 commit ac1eee8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,9 @@ case class OneRowRelationExec() extends LeafExecNode
339339
"numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output rows"))
340340

341341
protected override def doExecute(): RDD[InternalRow] = {
342-
val outputRow = InternalRow.empty
343342
val numOutputRows = longMetric("numOutputRows")
343+
val proj = UnsafeProjection.create(schema)
344+
val outputRow = proj(InternalRow.empty)
344345
rdd.mapPartitionsWithIndexInternal { (index, iter) =>
345346
iter.map { r =>
346347
numOutputRows += 1

0 commit comments

Comments
 (0)