nchammas commented on a change in pull request #27908:
URL: https://github.com/apache/spark/pull/27908#discussion_r474164350



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalog/Catalog.scala
##########
@@ -342,6 +342,44 @@ abstract class Catalog {
     createTable(tableName, source, schema, options)
   }
 
+  /**
+   * Creates a table based on the dataset in a data source and a set of 
options.
+   * Then, returns the corresponding DataFrame.
+   *
+   * @param tableName is either a qualified or unqualified name that 
designates a table.
+   *                  If no database identifier is provided, it refers to a 
table in
+   *                  the current database.
+   * @since 3.1.0
+   */
+  def createTable(
+      tableName: String,
+      source: String,
+      options: java.util.Map[String, String],
+      description: String): DataFrame = {
+    createTable(
+      tableName,
+      source = source,
+      options = options.asScala.toMap,
+      description = { if (description.isEmpty) None else Some(description) }
+    )
+  }
+
+  /**
+   * (Scala-specific)
+   * Creates a table based on the dataset in a data source and a set of 
options.
+   * Then, returns the corresponding DataFrame.
+   *
+   * @param tableName is either a qualified or unqualified name that 
designates a table.
+   *                  If no database identifier is provided, it refers to a 
table in
+   *                  the current database.
+   * @since 3.1.0
+   */
+  def createTable(
+      tableName: String,
+      source: String,
+      options: Map[String, String],
+      description: Option[String]): DataFrame

Review comment:
       Python won't call this particular signature.
   
   I assume you meant to make this comment on the signature that includes 
`java.util.Map[String, String]`, right? `description` is already a plain 
`String` there. The `Option[String]` is just for the Scala API.
   
   Does that address your concern, or am I misunderstanding something?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to