Skip to content

Commit

Permalink
Don't use null as BlockLocations
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Aug 20, 2020
1 parent e0ec9a6 commit b1bf5e9
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,7 @@ object HadoopFSUtils extends Logging {
def next(): LocatedFileStatus = remoteIter.next
def hasNext(): Boolean = remoteIter.hasNext
}.toArray
case _ =>
// We are ignoring locality, so we'll use a null locality
fs.listStatus(path).map{f =>
f match {
case _: LocatedFileStatus => f
case _ => new LocatedFileStatus(f, null)
}
}
case _ => fs.listStatus(path)
}
} catch {
// If we are listing a root path for SQL (e.g. a top level directory of a table), we need to
Expand Down

0 comments on commit b1bf5e9

Please sign in to comment.