srielau commented on code in PR #36857:
URL: https://github.com/apache/spark/pull/36857#discussion_r898729331
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuiteBase.scala:
##########
@@ -1272,4 +1272,37 @@ abstract class CastSuiteBase extends SparkFunSuite with
ExpressionEvalHelper {
"to restore the behavior before Spark 3.0."))
}
}
+
+ test("cast ANSI intervals to decimals") {
+ Seq(
Review Comment:
This is different. My examples test sucess. Yours tests a failure. Obviously
any number>= 10 and <100 cannot be even approximated in a single digit.
But any number between 0 and 9 can be approximated in a digit.
I’m curious why you see truncation rather than rounding given that decimal
to decimal rounds.
--
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]