Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
askwang committed Oct 9, 2024
1 parent b2641ad commit 8cec8c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ public void deleteTag(
List<TagCallback> callbacks) {
checkArgument(
!StringUtils.isNullOrWhitespaceOnly(tagName), "Tag name '%s' is blank.", tagName);
checkArgument(tagExists(tagName), "Tag '%s' doesn't exist.", tagName);
if (!tagExists(tagName)) {
LOG.warn("Tag '{}' doesn't exist.", tagName);
return;
}

Snapshot taggedSnapshot = taggedSnapshot(tagName);
List<Snapshot> taggedSnapshots;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,12 @@ class CreateAndDeleteTagProcedureTest extends PaimonSparkTestBase with StreamTes
}
}
}

test("Paimon Procedure: delete tag not failed if tag not exists") {
spark.sql("CREATE TABLE T (id STRING, name STRING) USING PAIMON")

checkAnswer(
spark.sql("CALL paimon.sys.delete_tag(table => 'test.T', tag => 'test_tag')"),
Row(true) :: Nil)
}
}

0 comments on commit 8cec8c1

Please sign in to comment.