gengliangwang commented on a change in pull request #30260:
URL: https://github.com/apache/spark/pull/30260#discussion_r521198497
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -1753,6 +1759,12 @@ case class Cast(child: Expression, dataType: DataType,
timeZoneId: Option[String
copy(timeZoneId = Option(timeZoneId))
override protected val ansiEnabled: Boolean = SQLConf.get.ansiEnabled
+
+ override def canCast(from: DataType, to: DataType): Boolean = if
(ansiEnabled) {
Review comment:
well, then we need to mention about the behavior of throwing overflow
exceptions when ANSI flag enabled. I will add some content in the
`sql-ref-ansi-compliance.md`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]