Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20020#discussion_r158288419
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/commands.scala
---
@@ -87,6 +87,51 @@ case class ExecutedCommandExec(cmd: RunnableCommand)
extends LeafExecNode {
}
}
+/**
+ * A physical operator that executes the run method of a
`DataWritingCommand` and
+ * saves the result to prevent multiple executions.
+ *
+ * @param cmd the `DataWritingCommand` this operator will run.
+ * @param children the children physical plans ran by the
`DataWritingCommand`.
+ */
+case class DataWritingCommandExec(cmd: DataWritingCommand, children:
Seq[SparkPlan])
+ extends SparkPlan {
+
+ override lazy val metrics: Map[String, SQLMetric] = cmd.metrics
+
+ /**
+ * A concrete command should override this lazy field to wrap up any
side effects caused by the
--- End diff --
is this comment valid?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]