Github user ericl commented on a diff in the pull request:
    --- Diff: 
    @@ -58,13 +58,21 @@ case class CreateDataSourceTableCommand(table: 
CatalogTable, ignoreIfExists: Boo
         // Create the relation to validate the arguments before writing the 
metadata to the metastore,
         // and infer the table schema and partition if users didn't specify 
schema in CREATE TABLE.
         val pathOption ="path" -> _)
    +    // Fill in some default table options from the session conf
    +    val uncreatedTable = table.copy(
    +      identifier = table.identifier.copy(
    +        database = Some(
    +      tracksPartitionsInCatalog = 
         val dataSource: BaseRelation =
             sparkSession = sparkSession,
             userSpecifiedSchema = if (table.schema.isEmpty) None else 
    +        partitionColumns = table.partitionColumnNames,
    --- End diff --
    You do need to pass it in though.
            val fileCatalog = if 
(sparkSession.sqlContext.conf.manageFilesourcePartitions &&
                catalogTable.isDefined && 
catalogTable.get.tracksPartitionsInCatalog) {
              new CatalogFileIndex(
            } else {
              new InMemoryFileIndex(sparkSession, globbedPaths, options, 
    Otherwise, this code will perform a full filesystem scan, independent of 
the other change to prevent getOrInferFileFormatSchema from performing a scan 
as well.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to