cloud-fan commented on a change in pull request #35478:
URL: https://github.com/apache/spark/pull/35478#discussion_r803710602
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -171,17 +183,23 @@ object AnsiTypeCoercion extends TypeCoercionBase {
// This type coercion system will allow implicit converting String type
literals as other
// primitive types, in case of breaking too many existing Spark SQL
queries.
- case (StringType, a: AtomicType) if isInputFoldable =>
+ case (StringType, a: AtomicType) =>
Some(a)
// If the target type is any Numeric type, convert the String type
literal as Double type.
- case (StringType, NumericType) if isInputFoldable =>
+ case (StringType, NumericType) =>
Some(DoubleType)
- // If the target type is any Decimal type, convert the String type
literal as Double type.
- case (StringType, DecimalType) if isInputFoldable =>
+ // If the target type is any Decimal type, convert the String type
literal as the default
Review comment:
nit: not literal anymore
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]