sohardforaname commented on code in PR #20976:
URL: https://github.com/apache/doris/pull/20976#discussion_r1234665203


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/SupportJavaDateFormatter.java:
##########
@@ -75,11 +75,11 @@ private Expression translateJavaFormatter(Expression 
formatterExpr) {
             Literal literal = (Literal) formatterExpr;
             String originFormatter = literal.getStringValue();
             if (originFormatter.equals("yyyyMMdd")) {
-                return new StringLiteral("%Y%m%d");
+                return new VarcharLiteral("%Y%m%d");
             } else if (originFormatter.equals("yyyy-MM-dd")) {
-                return new StringLiteral("%Y-%m-%d");
+                return new VarcharLiteral("%Y-%m-%d");
             } else if (originFormatter.equals("yyyy-MM-dd HH:mm:ss")) {
-                return new StringLiteral("%Y-%m-%d %H:%i:%s");
+                return new VarcharLiteral("%Y-%m-%d %H:%i:%s");

Review Comment:
   because the executable functions' signatures are all varchar but not string.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to