@@ -321,14 +321,12 @@ case class RDDScanExec(
321321}
322322
323323/**
324- * A special case of RDDScanExec that is used to represent a scan without a `FROM` clause.
325- * For example, 'select version()'.
324+ * A physical plan node for `OneRowRelation` for scans with no 'FROM' clause.
326325 *
327326 * We do not extend `RDDScanExec` in order to avoid complexity due to `TreeNode.makeCopy` and
328327 * `TreeNode`'s general use of reflection.
329328 */
330329case class OneRowRelationExec () extends LeafExecNode
331- with StreamSourceAwareSparkPlan
332330 with InputRDDCodegen {
333331
334332 override val nodeName : String = s " Scan OneRowRelation "
@@ -341,20 +339,17 @@ case class OneRowRelationExec() extends LeafExecNode
341339 " numOutputRows" -> SQLMetrics .createMetric(sparkContext, " number of output rows" ))
342340
343341 protected override def doExecute (): RDD [InternalRow ] = {
342+ val outputRow = InternalRow .empty
344343 val numOutputRows = longMetric(" numOutputRows" )
345344 rdd.mapPartitionsWithIndexInternal { (index, iter) =>
346- val proj = UnsafeProjection .create(schema)
347- proj.initialize(index)
348345 iter.map { r =>
349346 numOutputRows += 1
350- proj(r)
347+ outputRow
351348 }
352349 }
353350 }
354351
355- override def simpleString (maxFields : Int ): String = {
356- s " $nodeName${truncatedString(output, " [" , " ," , " ]" , maxFields)}"
357- }
352+ override def simpleString (maxFields : Int ): String = s " $nodeName[] "
358353
359354 override def inputRDD : RDD [InternalRow ] = rdd
360355
@@ -365,5 +360,5 @@ case class OneRowRelationExec() extends LeafExecNode
365360 super .doCanonicalize().asInstanceOf [OneRowRelationExec ].copy()
366361 }
367362
368- override def getStream : Option [SparkDataStream ] = None
363+ // override def getStream: Option[SparkDataStream] = None
369364}
0 commit comments