You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/12/22 04:35:20 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #34976: [SPARK-37707][SQL] Allow store assignment between TimestampNTZ and Date/Timestamp

cloud-fan commented on a change in pull request #34976:
URL: https://github.com/apache/spark/pull/34976#discussion_r773593434



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -966,9 +966,7 @@ object TypeCoercion extends TypeCoercionBase {
       // Implicit cast from/to string
       case (StringType, DecimalType) => DecimalType.SYSTEM_DEFAULT
       case (StringType, target: NumericType) => target
-      case (StringType, DateType) => DateType
-      case (StringType, TimestampType) => TimestampType
-      case (StringType, AnyTimestampType) => AnyTimestampType.defaultConcreteType

Review comment:
       shall we still keep this line? in case a function defines its expected type as `AnyTimestampType`, and we need to cast string to the default concrete type of `AnyTimestampType`




-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org