Github user mallman commented on a diff in the pull request:
https://github.com/apache/spark/pull/15539#discussion_r83987017
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileCatalog.scala
---
@@ -276,15 +290,15 @@ object PartitioningAwareFileCatalog extends Logging {
*/
private def listLeafFilesInSerial(
paths: Seq[Path],
- hadoopConf: Configuration): Seq[FileStatus] = {
+ hadoopConf: Configuration): Map[Path, Seq[FileStatus]] = {
// Dummy jobconf to get to the pathFilter defined in configuration
val jobConf = new JobConf(hadoopConf, this.getClass)
val filter = FileInputFormat.getInputPathFilter(jobConf)
- paths.flatMap { path =>
+ paths.map { path =>
val fs = path.getFileSystem(hadoopConf)
- listLeafFiles0(fs, path, filter)
- }
+ (path, listLeafFiles0(fs, path, filter))
+ }.toMap
--- End diff --
Based on how you're using this return value above, it looks like you can
omit this call to `toMap` and just return a sequence of tuples.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]