ILuffZhe commented on code in PR #4150:
URL: https://github.com/apache/calcite/pull/4150#discussion_r1919443761
##########
linq4j/src/main/java/org/apache/calcite/linq4j/tree/Primitive.java:
##########
@@ -427,7 +427,7 @@ static BigDecimal checkOverflow(BigDecimal value, int
precision, int scale,
/** Called from BuiltInMethod.CHAR_DECIMAL_CAST_ROUNDING_MODE */
public static @Nullable Object charToDecimalCast(
@Nullable String value, int precision, int scale, RoundingMode
roundingMode) {
- if (value == null) {
+ if (value == null || value.isEmpty()) {
Review Comment:
Can we have any tests here?
--
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]