Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5014#discussion_r28200359
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicOperators.scala
 ---
    @@ -137,12 +137,13 @@ case class InsertIntoTable(
       }
     }
     
    -case class CreateTableAsSelect[T](
    -    databaseName: Option[String],
    -    tableName: String,
    -    child: LogicalPlan,
    -    allowExisting: Boolean,
    -    desc: Option[T] = None) extends UnaryNode {
    +trait CreateTableAsSelect extends UnaryNode {
    +  self: Product =>
    +  def databaseName: Option[String]
    +  def tableName: String
    +  def child: LogicalPlan
    +  def allowExisting: Boolean
    +
    --- End diff --
    
    I guess we cannot use `Command` because a `Command` is a `LeafNode`. If we 
make it a `Command`, the child logical plan will not be analyzed and optimized.


---
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]

Reply via email to