dongjoon-hyun commented on code in PR #43812: URL: https://github.com/apache/spark/pull/43812#discussion_r1393823245
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala: ########## @@ -934,8 +934,8 @@ object TypeCoercion extends TypeCoercionBase { // There is no proper decimal type we can pick, // using double type is the best we can do. // See SPARK-22469 for details. - case (n: DecimalType, s: StringType) => Some(DoubleType) - case (s: StringType, n: DecimalType) => Some(DoubleType) + case (DecimalType.Fixed(_, s), _: StringType) if s > 0 => Some(DoubleType) + case (_: StringType, DecimalType.Fixed(_, s)) if s > 0 => Some(DoubleType) Review Comment: Could you add some description about `s == 0` case after the line 936, please? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org