Skip to content

Commit

Permalink
Fixes a bug when reading a single Parquet data file
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed May 18, 2015
1 parent b84612a commit 3d278f7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,11 @@ abstract class HadoopFsRelation private[sql](maybePartitionSpec: Option[Partitio
requiredColumns: Array[String],
filters: Array[Filter],
inputPaths: Array[String]): RDD[Row] = {
val inputStatuses = inputPaths.flatMap { path =>
fileStatusCache.leafFiles.values.filter(_.getPath.getParent == new Path(path))
val inputStatuses = inputPaths.flatMap { input =>
fileStatusCache.leafFiles.values.filter { status =>
val path = new Path(input)
status.getPath.getParent == path || status.getPath == path
}
}
buildScan(requiredColumns, filters, inputStatuses)
}
Expand Down

0 comments on commit 3d278f7

Please sign in to comment.