yht0827 commented on code in PR #10390:
URL: https://github.com/apache/seatunnel/pull/10390#discussion_r2751267096
##########
seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonToRowConverters.java:
##########
@@ -258,16 +258,29 @@ private float convertToFloat(JsonNode jsonNode) {
private LocalDate convertToLocalDate(JsonNode jsonNode, String fieldName) {
String dateStr = jsonNode.asText();
- DateTimeFormatter dateFormatter = fieldFormatterMap.get(fieldName);
+
+ if (dateStr == null || dateStr.trim().isEmpty()) {
+ return null;
+ }
Review Comment:
You're right. I've removed the empty string null check in the latest commit.
Invalid date strings should trigger the appropriate exception as expected.
--
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]