You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/10/13 17:49:51 UTC

spark git commit: [SPARK-22252][SQL][FOLLOWUP] Command should not be a LeafNode

Repository: spark
Updated Branches:
  refs/heads/master 6412ea175 -> 3823dc88d


[SPARK-22252][SQL][FOLLOWUP] Command should not be a LeafNode

## What changes were proposed in this pull request?

This is a minor folllowup of #19474 .

#19474 partially reverted #18064 but accidentally introduced a behavior change. `Command` extended `LogicalPlan` before #18064 , but #19474 made it extend `LeafNode`. This is an internal behavior change as now all `Command` subclasses can't define children, and they have to implement `computeStatistic` method.

This PR fixes this by making `Command` extend `LogicalPlan`

## How was this patch tested?

N/A

Author: Wenchen Fan <we...@databricks.com>

Closes #19493 from cloud-fan/minor.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3823dc88
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3823dc88
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3823dc88

Branch: refs/heads/master
Commit: 3823dc88d3816c7d1099f9601426108acc90574c
Parents: 6412ea1
Author: Wenchen Fan <we...@databricks.com>
Authored: Fri Oct 13 10:49:48 2017 -0700
Committer: gatorsmile <ga...@gmail.com>
Committed: Fri Oct 13 10:49:48 2017 -0700

----------------------------------------------------------------------
 .../org/apache/spark/sql/catalyst/plans/logical/Command.scala     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/3823dc88/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala
index 38f4708..ec5766e 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala
@@ -24,6 +24,7 @@ import org.apache.spark.sql.catalyst.expressions.Attribute
  * commands can be used by parsers to represent DDL operations.  Commands, unlike queries, are
  * eagerly executed.
  */
-trait Command extends LeafNode {
+trait Command extends LogicalPlan {
   override def output: Seq[Attribute] = Seq.empty
+  override def children: Seq[LogicalPlan] = Seq.empty
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org