Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/5963#discussion_r29996229
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala ---
@@ -576,43 +592,155 @@
https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
children)
val (db, tableName) = extractDbNameTableName(tableNameParts)
- var tableDesc =
- HiveTable(
- specifiedDatabase = db,
- name = tableName,
- schema = Seq.empty,
- partitionColumns = Seq.empty,
- properties = Map.empty,
- serdeProperties = Map.empty,
- tableType = ManagedTable,
- location = None,
- inputFormat = None,
- outputFormat = None,
- serde = None)
-
- // TODO: Handle all the cases here...
- children.foreach {
- case Token("TOK_TBLRCFILE", Nil) =>
- import org.apache.hadoop.hive.ql.io.{RCFileInputFormat,
RCFileOutputFormat}
+ // TODO add bucket support
+ var tableDesc: HiveTable = HiveTable(
+ specifiedDatabase = db,
+ name = tableName,
+ schema = Seq.empty[HiveColumn],
+ partitionColumns = Seq.empty[HiveColumn],
+ properties = Map[String, String](),
+ serdeProperties = Map[String, String](),
+ tableType = if (externalTable.isDefined) ExternalTable else
ManagedTable,
+ location = None,
+ inputFormat = None,
+ outputFormat = None,
+ serde = None,
+ viewText = None)
+
+ // default serde & input/output format
+ tableDesc = if ("SequenceFile".equalsIgnoreCase(
+ hiveConf.getVar(HiveConf.ConfVars.HIVEDEFAULTFILEFORMAT))) {
--- End diff --
Perhaps assign `hiveConf.getVar(HiveConf.ConfVars.HIVEDEFAULTFILEFORMAT)`
to a variable so the wrapping doesn't have to be so hard to follow.
---
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]