Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core]tag create time nullable #3289

Merged
merged 4 commits into from
May 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@

import org.apache.paimon.shade.guava30.com.google.common.collect.Iterators;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -71,6 +73,8 @@ public class TagsTable implements ReadonlyTable {
private static final long serialVersionUID = 1L;

public static final String TAGS = "tags";
private static final LocalDateTime DEFAULT_TAG_CREATE_TIME =
LocalDateTime.ofInstant(Instant.ofEpochMilli(0L), ZoneId.systemDefault());

public static final RowType TABLE_TYPE =
new RowType(
Expand Down Expand Up @@ -248,7 +252,7 @@ private InternalRow toRow(
BinaryString.fromString(branches == null ? "[]" : branches.toString()),
Timestamp.fromLocalDateTime(
tag.getTagCreateTime() == null
? LocalDateTime.MIN
? DEFAULT_TAG_CREATE_TIME
: tag.getTagCreateTime()),
BinaryString.fromString(
tag.getTagTimeRetained() == null
Expand Down