hoperunChen commented on code in PR #4150:
URL: https://github.com/apache/calcite/pull/4150#discussion_r1919448067
##########
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:
Of course, testing can be done. My test case is attached in the comments on
the [Jira ticket](https://issues.apache.org/jira/browse/CALCITE-6789); you can
use my example to try it out.
If it’s truly impossible to modify the method, could you provide me with a
solution to my issue? The CSV file is not controlled by the program, so I
cannot change the values of the titles.
--
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]