Hisoka-X commented on code in PR #9334:
URL: https://github.com/apache/seatunnel/pull/9334#discussion_r2173223499
##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/StringFunction.java:
##########
@@ -624,7 +633,16 @@ public static String space(List<Object> args) {
}
public static String substring(List<Object> args) {
- String s = (String) args.get(0);
+ Object obj = args.get(0);
+ String s;
+ if (obj instanceof Date
+ || obj instanceof LocalDateTime
+ || obj instanceof LocalDate
+ || obj instanceof LocalTime) {
+ s = formatDate(obj);
Review Comment:
Please reuse
https://github.com/apache/seatunnel/blob/670a52a918ce6fb4baa73006856eb1b085e2ff97/seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/functions/SystemFunction.java#L93
--
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]