This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new bd2618b611 [core] Batch tag supports custom time zone (#5954)
bd2618b611 is described below
commit bd2618b611befd9287cdae43bd0054aeb4d69c1c
Author: yuzelin <[email protected]>
AuthorDate: Fri Jul 25 18:51:45 2025 +0800
[core] Batch tag supports custom time zone (#5954)
---
.../src/main/java/org/apache/paimon/tag/TagBatchCreation.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/tag/TagBatchCreation.java
b/paimon-core/src/main/java/org/apache/paimon/tag/TagBatchCreation.java
index b310add1eb..2b637db1cb 100644
--- a/paimon-core/src/main/java/org/apache/paimon/tag/TagBatchCreation.java
+++ b/paimon-core/src/main/java/org/apache/paimon/tag/TagBatchCreation.java
@@ -45,6 +45,7 @@ public class TagBatchCreation {
private final TagManager tagManager;
private final SnapshotManager snapshotManager;
private final TagDeletion tagDeletion;
+ private final ZoneId zoneId;
public TagBatchCreation(FileStoreTable table) {
this.table = table;
@@ -52,6 +53,7 @@ public class TagBatchCreation {
this.tagManager = table.tagManager();
this.tagDeletion = table.store().newTagDeletion();
this.options = table.coreOptions();
+ this.zoneId = options.sinkProcessTimeZone();
}
public void createTag() {
@@ -59,8 +61,8 @@ public class TagBatchCreation {
if (snapshot == null) {
return;
}
- Instant instant = Instant.ofEpochMilli(snapshot.timeMillis());
- LocalDateTime localDateTime = LocalDateTime.ofInstant(instant,
ZoneId.systemDefault());
+ LocalDateTime localDateTime =
+
Instant.ofEpochMilli(snapshot.timeMillis()).atZone(zoneId).toLocalDateTime();
String tagName =
options.tagBatchCustomizedName() != null
? options.tagBatchCustomizedName()