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] Fix should ignore the Long.MIN value when create TAG based on … #3457

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private WatermarkExtractor(ZoneId watermarkZoneId) {

@Override
public Optional<LocalDateTime> extract(long timeMilli, @Nullable Long watermark) {
if (watermark == null) {
if (watermark == null || watermark < 0) {
return Optional.empty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public void testTagSinkWatermark() throws Exception {
TableCommitImpl commit = table.newCommit(commitUser).ignoreEmptyCommit(false);
TagManager tagManager = table.store().newTagManager();

// test watermark is Long.MIN_VALUE.
commit.commit(new ManifestCommittable(0, Long.MIN_VALUE));
assertThat(tagManager.allTagNames()).isEmpty();

// test first create
commit.commit(new ManifestCommittable(0, localZoneMills("2023-07-18T12:00:09")));
assertThat(tagManager.allTagNames()).containsOnly("2023-07-18 11");
Expand Down
Loading