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

    https://github.com/apache/spark/pull/16944#discussion_r104085920
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
    @@ -195,17 +207,20 @@ private[hive] class 
HiveMetastoreCatalog(sparkSession: SparkSession) extends Log
               fileFormatClass,
               None)
             val logicalRelation = cached.getOrElse {
    +          val fileIndex = new InMemoryFileIndex(sparkSession, 
Seq(rootPath), options, None)
    --- End diff --
    
    I was thinking that ```InMemoryFileIndex``` had similar semantics to 
```CatalogFileIndex``` where the leaf files are only listed if  
```listFiles()``` is invoked. I can make the ```fileIndex``` arg of 
```inferIfNeeded()``` a ```Option[FileIndex]``` and create the 
```InMemoryFileIndex``` within that method instead if we need to infer a schema 
and no file index is provided.


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