cloud-fan commented on code in PR #53370:
URL: https://github.com/apache/spark/pull/53370#discussion_r2601228583
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:
##########
@@ -753,43 +825,33 @@ case class TimeTrunc(unit: Expression, time: Expression)
}
abstract class IntegralToTimeBase
- extends UnaryExpression with ExpectsInputTypes with CodegenFallback {
+ extends UnaryExpression with ExpectsInputTypes with
TimeConversionErrorHandling {
protected def upScaleFactor: Long
+ def failOnError: Boolean = SQLConf.get.ansiEnabled
Review Comment:
```suggestion
def failOnError: Boolean = true
```
We should always use ansi behavior for new functions. This flag is still
useful when we add the `try` version of these functions.
--
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]