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

    https://github.com/apache/spark/pull/8026#discussion_r42447228
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
 ---
    @@ -236,15 +241,22 @@ private[sql] object PartitioningUtils {
       }
     
       /**
    -   * Converts a string to a [[Literal]] with automatic type inference.  
Currently only supports
    -   * [[IntegerType]], [[LongType]], [[DoubleType]], 
[[DecimalType.SYSTEM_DEFAULT]], and
    -   * [[StringType]].
    +   * Converts a string to a [[Literal]] with automatic type inference if 
no field type specified.
    +   * Auto inference only supports [[IntegerType]], [[LongType]], 
[[DoubleType]],
    +   * [[DecimalType.SYSTEM_DEFAULT]], and [[StringType]].
        */
       private[sql] def inferPartitionColumnValue(
    +      expectedDT: Option[DataType],
    --- End diff --
    
    Per my other comment upthread, this is a bit confusing to me: this method 
is named infer, but has a mode where it won't perform inference (controlled by 
a boolean flag), and now has another new field which _also_ bypasses inference 
_and_ performs a cast. This is confusing to me.


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