Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22603#discussion_r221876275
  
    --- 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 --
    
    `lo.isInstanceOf[BlockLocation]`? Or even better, what about using pattern 
matching?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to