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

    https://github.com/apache/spark/pull/13022#discussion_r62891594
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileCatalog.scala
 ---
    @@ -54,9 +54,16 @@ abstract class PartitioningAwareFileCatalog(
         } else {
           prunePartitions(filters, partitionSpec()).map {
             case PartitionDirectory(values, path) =>
    -          Partition(
    -            values,
    -            leafDirToChildrenFiles(path).filterNot(_.getPath.getName 
startsWith "_"))
    +          val files: Seq[FileStatus] = leafDirToChildrenFiles.get(path) 
match {
    +            case Some(existingDir) =>
    +              // Directory has children files in it, return them
    +              existingDir.filterNot(_.getPath.getName.startsWith("_"))
    +
    +            case None =>
    +              // Directory does not exist, or has not children files
    +              Nil
    --- End diff --
    
    For the stacktrace in the description, how did we create the path of 
`file:/Users/tdas/Projects/Spark/spark2/target/tmp/spark-b39ad224-c5d1-4966-8981-fb45a2066d61/partition`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to