Skip to content

Commit

Permalink
update IT make two tags snapshot all expire
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-024 committed Jan 7, 2025
1 parent 30ef1ee commit d777508
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,14 @@ public void testTimeTravelReadWithSnapshotExpiration() throws Exception {
@Test
public void testIncrementBetweenReadWithSnapshotExpiration() throws Exception {
String tableName = "T";
batchSql(String.format("INSERT INTO %s VALUES (1, 11, 111), (2, 22, 222)", tableName));
batchSql(String.format("INSERT INTO %s VALUES (1, 11, 111)", tableName));

paimonTable(tableName).createTag("tag1", 1);

batchSql(String.format("INSERT INTO %s VALUES (3, 33, 333)", tableName));
batchSql(String.format("INSERT INTO %s VALUES (2, 22, 222)", tableName));
paimonTable(tableName).createTag("tag2", 2);
batchSql(String.format("INSERT INTO %s VALUES (3, 33, 333)", tableName));
paimonTable(tableName).createTag("tag3", 3);

// expire snapshot 1
Map<String, String> expireOptions = new HashMap<>();
Expand All @@ -322,7 +324,7 @@ public void testIncrementBetweenReadWithSnapshotExpiration() throws Exception {
String.format(
"SELECT * FROM %s /*+ OPTIONS('incremental-between' = 'tag1,tag2', 'deletion-vectors.enabled' = 'true') */",
tableName)))
.containsExactlyInAnyOrder(Row.of(3, 33, 333));
.containsExactlyInAnyOrder(Row.of(2, 22, 222));
}

@Test
Expand Down

0 comments on commit d777508

Please sign in to comment.