acelyc111 commented on a change in pull request #5436: URL: https://github.com/apache/incubator-doris/pull/5436#discussion_r589135143
########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java ########## @@ -253,6 +253,11 @@ public static DateLiteral createMinValue(Type type) throws AnalysisException { } private void init(String s, Type type) throws AnalysisException { + // if s contains micro seconds, split it and only maintain second part + // because BE only save a datetime with second part + if (s.length() > 19) { Review comment: `19` is a magic number, how about define a member variable like `MAX_DATE_VALUE_LENGTH = new String("yyyy-MM-dd hh:mm:ss").length();` ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org