You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/09/01 07:13:03 UTC

[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #4495: [Bug] function str_to_date()'s behavior on BE and FE is inconsistent

kangkaisen commented on a change in pull request #4495:
URL: https://github.com/apache/incubator-doris/pull/4495#discussion_r480905168



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
##########
@@ -632,4 +669,435 @@ public long getSecond() {
     public int hashCode() {
         return 31 * super.hashCode() + Objects.hashCode(unixTimestamp(TimeZone.getDefault()));
     }
+
+    // parset the date string value in 'value' by 'format' pattern.
+    // return the next position to parse if hasSubVal is true.
+    // throw InvalidFormatException if encounter errors.
+    // this method is exaclty same as from_date_format_str() in be/src/runtime/datetime_value.cpp
+    // change this method should also change that.
+    public int fromDateFormatStr(String format, String value, boolean hasSubVal) throws InvalidFormatException {

Review comment:
       Move these util methods to a single util class? 




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org