You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/04 23:40:53 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #6000: [HUDI-4340] fix not parsable text DateTimeParseException in HoodieInstantTimeGenerator.parseDateFromInstantTime

yihua commented on code in PR #6000:
URL: https://github.com/apache/hudi/pull/6000#discussion_r913296110


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java:
##########
@@ -97,7 +103,7 @@ public static Date parseDateFromInstantTime(String timestamp) throws ParseExcept
       return Date.from(dt.atZone(ZoneId.systemDefault()).toInstant());
     } catch (DateTimeParseException e) {
       // Special handling for all zero timestamp which is not parsable by DateTimeFormatter
-      if (timestamp.equals(ALL_ZERO_TIMESTAMP)) {
+      if (NOT_PARSABLE_TIMESTAMPS.contains(timestamp)) {

Review Comment:
   For each ts, should a different Date be returned, i.e., 
   ```
   INIT_INSTANT_TS = "00000000000000"   => Date(0)
   METADATA_BOOTSTRAP_INSTANT_TS = "00000000000001"  => Date(1000)
   FULL_BOOTSTRAP_INSTANT_TS = "00000000000002"  => Date(2000)
   ```
   ?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org