Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19389#discussion_r152262352
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningUtils.scala
---
@@ -372,11 +367,28 @@ object PartitioningUtils {
suspiciousPaths.map("\t" + _).mkString("\n", "\n", "")
}
+ // scalastyle:off line.size.limit
/**
- * Converts a string to a [[Literal]] with automatic type inference.
Currently only supports
- * [[IntegerType]], [[LongType]], [[DoubleType]], [[DecimalType]],
[[DateType]]
+ * Converts a string to a [[Literal]] with automatic type inference.
Currently only supports
+ * [[NullType]], [[IntegerType]], [[LongType]], [[DoubleType]],
[[DecimalType]], [[DateType]]
* [[TimestampType]], and [[StringType]].
+ *
+ * When resolving conflicts, it follows the table below:
+ *
+ *
+-----------------+-----------------+-----------------+-----------------+-----------------+----------+-------------+-------------+----------+
+ * |InputA \ InputB |NullType |IntegerType |LongType
|DecimalType(38,0)|DoubleType|DateType |TimestampType|StringType|
+ *
+-----------------+-----------------+-----------------+-----------------+-----------------+----------+-------------+-------------+----------+
+ * |NullType |NullType |IntegerType |LongType
|DecimalType(38,0)|DoubleType|DateType |TimestampType|StringType|
+ * |IntegerType |IntegerType |IntegerType |LongType
|DecimalType(38,0)|DoubleType|StringType |StringType |StringType|
+ * |LongType |LongType |LongType |LongType
|DecimalType(38,0)|StringType|StringType |StringType |StringType|
+ *
|DecimalType(38,0)|DecimalType(38,0)|DecimalType(38,0)|DecimalType(38,0)|DecimalType(38,0)|StringType|StringType
|StringType |StringType|
+ * |DoubleType |DoubleType |DoubleType |StringType
|StringType |DoubleType|StringType |StringType |StringType|
+ * |DateType |DateType |StringType |StringType
|StringType |StringType|DateType |TimestampType|StringType|
+ * |TimestampType |TimestampType |StringType |StringType
|StringType |StringType|TimestampType|TimestampType|StringType|
+ * |StringType |StringType |StringType |StringType
|StringType |StringType|StringType |StringType |StringType|
+ *
+-----------------+-----------------+-----------------+-----------------+-----------------+----------+-------------+-------------+----------+
--- End diff --
we should also put this table in sql-programming-guide and sql migration
guide.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]