You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "zhoulii (via GitHub)" <gi...@apache.org> on 2025/07/29 09:51:23 UTC

[PR] [core] Log a warning for invalid partition values instead of throwing an exception when enable partition mark done. [paimon]

zhoulii opened a new pull request, #5978:
URL: https://github.com/apache/paimon/pull/5978

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #5976
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [core] Log a warning for invalid partition values instead of throwing an exception when enable partition mark done. [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5978:
URL: https://github.com/apache/paimon/pull/5978#discussion_r2239541285


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/listener/PartitionMarkDoneTrigger.java:
##########
@@ -167,7 +176,10 @@ LocalDateTime extractDateTime(String partition) {
         try {
             return timeExtractor.extract(extractPartitionSpecFromPath(new Path(partition)));
         } catch (DateTimeParseException e) {
-            throw new RuntimeException("Can't extract datetime from partition " + partition, e);
+            LOG.warn(
+                    "Can't extract datetime from partition {}, please check configuration items 'partition.timestamp-formatter' and 'partition.timestamp-pattern'.",
+                    partition);
+            return LocalDateTime.MIN;

Review Comment:
   Can we just return Optional.empty?



-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [core] Log a warning for invalid partition values instead of throwing an exception when enable partition mark done. [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #5978:
URL: https://github.com/apache/paimon/pull/5978#issuecomment-3138616690

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [PR] [core] Log a warning for invalid partition values instead of throwing an exception when enable partition mark done. [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5978:
URL: https://github.com/apache/paimon/pull/5978


-- 
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: issues-unsubscribe@paimon.apache.org

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