Skip to content

Commit e270fea

Browse files
committed
address comments
1 parent 66f0bd3 commit e270fea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,16 @@ 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): Path = path.makeQualified(fs.getUri, fs.getWorkingDirectory)
224+
def qualifiedPath(path: Path): String = fs.makeQualified(path).toString
225225

226226
val qualifiedBasePath = qualifiedPath(userDefinedBasePath)
227227
rootPaths
228-
.find(p => !qualifiedPath(p).toString.startsWith(qualifiedBasePath.toString))
228+
.find(p => !qualifiedPath(p).startsWith(qualifiedBasePath))
229229
.foreach { rp =>
230230
throw new IllegalArgumentException(
231231
s"Wrong basePath $userDefinedBasePath for the root path: $rp")
232232
}
233-
Set(fs.makeQualified(userDefinedBasePath))
233+
Set(new Path(qualifiedBasePath))
234234

235235
case None =>
236236
rootPaths.map { path =>

0 commit comments

Comments
 (0)