Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/5733#discussion_r35670590
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
@@ -191,7 +253,56 @@ private[hive] class HiveMetastoreCatalog(val client:
ClientInterface, hive: Hive
ManagedTable
}
- client.createTable(
+ val hiveSerDe = HiveSerDe.sourceToSerDe(provider, hive.hiveconf,
false).getOrElse(null)
+
+ if (hiveSerDe == null) {
+ logWarning(s"Unable to find the SerDe info for $provider, " +
+ s"the table probably unable be read by Hive")
+ }
+
+ val hiveTable = if (conf.writeSchemaToHiveMetastore && hiveSerDe !=
null) {
+ // get the schema from the data source
+ val ds = ResolvedDataSource(hive, userSpecifiedSchema,
partitionColumns, provider, options)
+ ds.relation match {
+ case fs: HadoopFsRelation if fs.paths.length == 1 =>
--- End diff --
I don't quite get it...
---
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]