Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/2570#discussion_r18281532
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
@@ -70,6 +77,153 @@ private[hive] class HiveMetastoreCatalog(hive:
HiveContext) extends Catalog with
table.getTTable, partitions.map(part => part.getTPartition))(hive)
}
+ /**
+ * Create table with specified database, table name, table description
and schema
+ * @param dbName Database Name
+ * @param tblName Table Name
+ * @param crtTbl CreateTableDesc object which contains the SerDe info
+ * @param schema Schema of the new table, if not specified, will use the
schema
+ * specified in crtTbl
+ */
+ def createTable(
+ dbName: String,
+ tblName: String,
+ crtTbl: CreateTableDesc,
+ schema: Seq[Attribute]) {
+ // Most of code are similar with the DDLTask.createTable(),
--- End diff --
Can we consolidate two `createTable`? With your change, seems the original
`createTable` will be only used by `createTable` in `HiveContext`.
Also, can you add comments to `HiveContext.createTable` to explain what
table properties will be used if users call this method?
---
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]