Skip to content

Commit 99d6590

Browse files
committed
Use partition function
1 parent e8a4d6d commit 99d6590

File tree

1 file changed

+1
-4
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,10 +747,7 @@ object DataSource extends Logging {
747747

748748
// Split the paths into glob and non glob paths, because we don't need to do an existence check
749749
// for globbed paths.
750-
val globPaths = qualifiedPaths
751-
.filter(path => SparkHadoopUtil.get.isGlobPath(path))
752-
val nonGlobPaths = qualifiedPaths
753-
.filter(path => !SparkHadoopUtil.get.isGlobPath(path))
750+
val (globPaths, nonGlobPaths) = qualifiedPaths.partition(SparkHadoopUtil.get.isGlobPath)
754751

755752
val globbedPaths = globPaths.par.flatMap { globPath =>
756753
val fs = globPath.getFileSystem(hadoopConf)

0 commit comments

Comments
 (0)