Github user liutang123 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19692#discussion_r149659840
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
---
@@ -137,6 +137,8 @@ object TypeCoercion {
case (DateType, TimestampType) => Some(StringType)
case (StringType, NullType) => Some(StringType)
case (NullType, StringType) => Some(StringType)
+ case (n: NumericType, s: StringType) => Some(DoubleType)
+ case (s: StringType, n: NumericType) => Some(DoubleType)
--- End diff --
This solved DecimalType but may also have known error.
For example:
`select '1.01' > 1.0;` // false
Is it possible to use DecimalType.SYSTEM_DEFAULT?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]