Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23165#discussion_r237339038
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileIndex.scala
 ---
    @@ -126,13 +126,14 @@ abstract class PartitioningAwareFileIndex(
         val caseInsensitiveOptions = CaseInsensitiveMap(parameters)
         val timeZoneId = 
caseInsensitiveOptions.get(DateTimeUtils.TIMEZONE_OPTION)
           .getOrElse(sparkSession.sessionState.conf.sessionLocalTimeZone)
    -    val inferredPartitionSpec = PartitioningUtils.parsePartitions(
    -      leafDirs,
    -      typeInference = 
sparkSession.sessionState.conf.partitionColumnTypeInferenceEnabled,
    -      basePaths = basePaths,
    -      timeZoneId = timeZoneId)
    +
         userSpecifiedSchema match {
           case Some(userProvidedSchema) if userProvidedSchema.nonEmpty =>
    +        val inferredPartitionSpec = PartitioningUtils.parsePartitions(
    +          leafDirs,
    +          typeInference = false,
    --- End diff --
    
    can you add some comment, so that we don't make the same mistake in the 
future?


---

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

Reply via email to