GitHub user adrian-ionescu opened a pull request: https://github.com/apache/spark/pull/17570
[SPARK-20255] Move listLeafFiles() to InMemoryFileIndex ## What changes were proposed in this pull request Trying to get a grip on the `FileIndex` hierarchy, I was confused by the following inconsistency: On the one hand, `PartitioningAwareFileIndex` defines `leafFiles` and `leafDirToChildrenFiles` as abstract, but on the other it fully implements `listLeafFiles` which does all the listing of files. However, the latter is only used by `InMemoryFileIndex`. I'm hereby proposing to move this method (and all its dependencies) to the implementation class that actually uses it, and thus unclutter the `PartitioningAwareFileIndex` interface. ## How was this patch tested? `./build/sbt sql/test` You can merge this pull request into a Git repository by running: $ git pull https://github.com/adrian-ionescu/apache-spark list-leaf-files Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17570.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17570 ---- commit 1c69820f9d905f75b5d7e90b5d0e17b690e8d8bf Author: Adrian Ionescu <adr...@databricks.com> Date: 2017-04-07T17:06:49Z Move listLeafFiles() to InMemoryFileIndex ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org