Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/16787#discussion_r100329892
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
---
@@ -845,10 +855,10 @@ private[hive] class HiveClientImpl(
hiveTable.setFields(schema.asJava)
}
hiveTable.setPartCols(partCols.asJava)
- hiveTable.setOwner(conf.getUser)
+ conf.foreach(c => hiveTable.setOwner(c.getUser))
hiveTable.setCreateTime((table.createTime / 1000).toInt)
hiveTable.setLastAccessTime((table.lastAccessTime / 1000).toInt)
- table.storage.locationUri.foreach { loc =>
shim.setDataLocation(hiveTable, loc) }
+ table.storage.locationUri.foreach { loc =>
hiveTable.getTTable.getSd.setLocation(loc)}
--- End diff --
We might need to add the extra test case or checks to
[VersionsSuites](https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala)
for verifying the location is correctly set.
I am not 100% sure it works for all the versions we support.
---
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]