File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -221,16 +221,15 @@ abstract class PartitioningAwareFileIndex(
221221 if (! fs.isDirectory(userDefinedBasePath)) {
222222 throw new IllegalArgumentException (s " Option ' $BASE_PATH_PARAM' must be a directory " )
223223 }
224- def qualifiedPath (path : Path ): String = fs.makeQualified(path).toString
225-
226- val qualifiedBasePath = qualifiedPath(userDefinedBasePath)
224+ val qualifiedBasePath = fs.makeQualified(userDefinedBasePath)
225+ val qualifiedBasePathStr = qualifiedBasePath.toString
227226 rootPaths
228- .find(p => ! qualifiedPath(p). startsWith(qualifiedBasePath ))
227+ .find(! fs.makeQualified(_).toString. startsWith(qualifiedBasePathStr ))
229228 .foreach { rp =>
230229 throw new IllegalArgumentException (
231230 s " Wrong basePath $userDefinedBasePath for the root path: $rp" )
232231 }
233- Set (new Path ( qualifiedBasePath) )
232+ Set (qualifiedBasePath)
234233
235234 case None =>
236235 rootPaths.map { path =>
You can’t perform that action at this time.
0 commit comments