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

    https://github.com/apache/spark/pull/12856#discussion_r61830983
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/fileSourceInterfaces.scala
 ---
    @@ -291,8 +291,12 @@ class HDFSFileCatalog(
       refresh()
     
       override def listFiles(filters: Seq[Expression]): Seq[Partition] = {
    +
         if (partitionSpec().partitionColumns.isEmpty) {
    -      Partition(InternalRow.empty, allFiles().filterNot(_.getPath.getName 
startsWith "_")) :: Nil
    +      Partition(
    +        InternalRow.empty,
    +        unpartitionedDataFiles().filterNot(_.getPath.getName startsWith 
"_")
    --- End diff --
    
    I dont know for sure. if there is a partitioning scheme, there is an 
additional filter on files that start with "_" in `listFiles`, that does not 
seem to be present in `allFiles`. So I am not sure where its best to merge.
    
    Also, I think this way is slightly cleaner than listFiles conditionally 
depending on allFiles.


---
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