Skip to content

Commit

Permalink
[SPARK-22252][SQL][FOLLOWUP] Command should not be a LeafNode
Browse files Browse the repository at this point in the history
## 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 <[email protected]>

Closes #19493 from cloud-fan/minor.
  • Loading branch information
cloud-fan authored and gatorsmile committed Oct 13, 2017
1 parent 6412ea1 commit 3823dc8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 3823dc8

Please sign in to comment.