Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/20611#discussion_r211607975
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -413,6 +363,38 @@ case class LoadDataCommand(
CommandUtils.updateTableStats(sparkSession, targetTable)
Seq.empty[Row]
}
+
+ /**
+ * Returns a qualified path object. Method ported from
org.apache.hadoop.fs.Path class.
+ *
+ * @param defaultUri default uri corresponding to the filesystem
provided.
+ * @param workingDir the working directory for the particular child path
wd-relative names.
+ * @param path Path instance based on the path string specified by
the user.
+ * @return qualified path object
+ */
+ private def makeQualified(defaultUri: URI, workingDir: Path, path:
Path): Path = {
+ val pathUri = {
+ if (!path.isAbsolute()) new Path(workingDir, path).toUri() else
path.toUri()
+ }
+ if (pathUri.getScheme == null || pathUri.getAuthority == null &&
+ defaultUri.getAuthority != null) {
--- End diff --
This should indent two more spaces to line up with the start of the
condition above.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]