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

    https://github.com/apache/spark/pull/11048#discussion_r52616927
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala ---
    @@ -418,3 +419,312 @@ case class SetDatabaseCommand(databaseName: String) 
extends RunnableCommand {
     
       override val output: Seq[Attribute] = Seq.empty
     }
    +
    +case class CreateDataBase(
    +    databaseName: String,
    +    allowExisting: Boolean,
    +    path: Option[String],
    +    comment: Option[String],
    +    props: Map[String, String])(sql: String) extends RunnableCommand with 
Logging {
    +
    +  override def run(sqlContext: SQLContext): Seq[Row] = {
    --- End diff --
    
    `override def run(sqlContext: SQLContext)` and `override val output: 
Seq[Attribute]` are the same is every command. Lets introduce a class which 
implements this for us.


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