morrySnow commented on code in PR #49033:
URL: https://github.com/apache/doris/pull/49033#discussion_r1995007351
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/DateTimeExtractAndTransform.java:
##########
@@ -631,19 +636,19 @@ public static Expression strToDate(StringLikeLiteral str,
StringLikeLiteral form
boolean hasMicroPart = org.apache.doris.analysis.DateLiteral
.hasMicroSecondPart(format.getStringValue());
return
DateTimeV2Literal.fromJavaDateType(DateUtils.getTime(DateUtils.formatBuilder(format.getValue())
- .toFormatter(), str.getValue()), hasMicroPart ? 6 : 0);
+
.toFormatter().withResolverStyle(ResolverStyle.STRICT), str.getValue()),
hasMicroPart ? 6 : 0);
Review Comment:
could we refactor `formatBuilder` lightly to avoid call
`.toFormatter().withResolverStyle(ResolverStyle.STRICT)` too many times in
different place
--
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]