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

    https://github.com/apache/spark/pull/23165#discussion_r237510705
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
 ---
    @@ -94,18 +94,34 @@ object PartitioningUtils {
           paths: Seq[Path],
           typeInference: Boolean,
           basePaths: Set[Path],
    +      userSpecifiedSchema: Option[StructType],
    +      caseSensitive: Boolean,
           timeZoneId: String): PartitionSpec = {
    -    parsePartitions(paths, typeInference, basePaths, 
DateTimeUtils.getTimeZone(timeZoneId))
    +    parsePartitions(paths, typeInference, basePaths, userSpecifiedSchema,
    +      caseSensitive, DateTimeUtils.getTimeZone(timeZoneId))
       }
     
       private[datasources] def parsePartitions(
           paths: Seq[Path],
           typeInference: Boolean,
           basePaths: Set[Path],
    +      userSpecifiedSchema: Option[StructType],
    +      caseSensitive: Boolean,
           timeZone: TimeZone): PartitionSpec = {
    +    val userSpecifiedDataTypes = if (userSpecifiedSchema.isDefined) {
    --- End diff --
    
    can we build this at the caller side out of `PartitioningUtils`? Then we 
only need one extra parameter.


---

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

Reply via email to