Github user peter-toth commented on a diff in the pull request: https://github.com/apache/spark/pull/22603#discussion_r221890344 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala --- @@ -315,7 +315,12 @@ object InMemoryFileIndex extends Logging { // which is very slow on some file system (RawLocalFileSystem, which is launch a // subprocess and parse the stdout). try { - val locations = fs.getFileBlockLocations(f, 0, f.getLen) + val locations = fs.getFileBlockLocations(f, 0, f.getLen).map( + loc => if (loc.getClass == classOf[BlockLocation]) { --- End diff -- Thanks @mgaido91, but loc is always an instance of `BlockLocation` (might be a subclass such as `HdfsBlockLocation`) so isInstanceOf[BlockLocation] or pattern matching would return always true. I want to test that the class of loc is exactly `BlockLocation` and if it is we don't need to convert it.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org