Github user chenghao-intel commented on a diff in the pull request:
https://github.com/apache/spark/pull/8026#discussion_r42451143
--- 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 --
In the master branch, if `typeInference == false`, it means the data type
of partition key will be `StringType` by default, otherwise, it's probably will
be `IntegerType`, `LongType` etc. depends on the real value the partition key
is.
---
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]