Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/3712#discussion_r21928826
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala ---
@@ -26,27 +26,6 @@ import org.apache.spark.sql.catalyst.plans.logical
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.{SQLConf, SQLContext}
-// TODO: DELETE ME...
-trait Command {
- this: SparkPlan =>
-
- /**
- * A concrete command should override this lazy field to wrap up any
side effects caused by the
- * command or any other computation that should be evaluated exactly
once. The value of this field
- * can be used as the contents of the corresponding RDD generated from
the physical plan of this
- * command.
- *
- * The `execute()` method of all the physical command classes should
reference `sideEffectResult`
- * so that the command can be executed eagerly right after the command
query is created.
- */
- protected lazy val sideEffectResult: Seq[Row] = Seq.empty[Row]
-
- override def executeCollect(): Array[Row] = sideEffectResult.toArray
-
- override def execute(): RDD[Row] =
sqlContext.sparkContext.parallelize(sideEffectResult, 1)
-}
-
-// TODO: Replace command with runnable command.
trait RunnableCommand extends logical.Command {
--- End diff --
And below on `ExecutedCommand`.
```scala
/**
* A physical operator that executes the run method of a `RunnableCommand`
and
* saves the result to prevent multiple executions.
*/
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]