cloud-fan commented on a change in pull request #26195: [SPARK-29537][SQL]
throw exception when user defined a wrong base path
URL: https://github.com/apache/spark/pull/26195#discussion_r352429554
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala
##########
@@ -221,6 +221,15 @@ abstract class PartitioningAwareFileIndex(
if (!fs.isDirectory(userDefinedBasePath)) {
throw new IllegalArgumentException(s"Option '$BASE_PATH_PARAM' must
be a directory")
}
+ def qualifiedPath(path: Path): Path = path.makeQualified(fs.getUri,
fs.getWorkingDirectory)
+
+ val qualifiedBasePath = qualifiedPath(userDefinedBasePath)
Review comment:
let's call `toString` here, to avoid calling `toString` later many times
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]