rubenada commented on code in PR #3481:
URL: https://github.com/apache/calcite/pull/3481#discussion_r1375880333
##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -624,7 +624,7 @@ void testCastExactNumericLimits(CastType castType,
SqlOperatorFixture f) {
f.checkCastFails(numeric.minOverflowNumericString,
type, LITERAL_OUT_OF_RANGE_MESSAGE, false, castType);
} else {
- if (Bug.CALCITE_2539_FIXED) {
+ if (numeric != Numeric.DECIMAL5_2 || Bug.CALCITE_2539_FIXED) {
f.checkCastFails(numeric.maxOverflowNumericString,
type, OUT_OF_RANGE_MESSAGE, true, castType);
Review Comment:
Thanks for the improvements @mihaibudiu . One last question, shouldn't we
adjust the expected error message in these lines for the actual expected error
message (instead of `OUT_OF_RANGE_MESSAGE`)?
```
if (numeric != Numeric.DECIMAL5_2 || Bug.CALCITE_2539_FIXED) {
f.checkCastFails(numeric.maxOverflowNumericString,
type, OUT_OF_RANGE_MESSAGE, true, castType); // <-- *****
f.checkCastFails(numeric.minOverflowNumericString,
type, OUT_OF_RANGE_MESSAGE, true, castType); // <-- *****
}
```
--
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]