-
- Downloads
[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` Author: Adrian Ionescu <adrian@databricks.com> Closes #17570 from adrian-ionescu/list-leaf-files.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala 226 additions, 0 deletions...e/spark/sql/execution/datasources/InMemoryFileIndex.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala 1 addition, 222 deletions...ql/execution/datasources/PartitioningAwareFileIndex.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileIndexSuite.scala 9 additions, 9 deletions...ache/spark/sql/execution/datasources/FileIndexSuite.scala
Loading
Please register or sign in to comment