You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "nickdelnano (via GitHub)" <gi...@apache.org> on 2025/05/26 15:14:49 UTC
[PR] Call Iceberg callback on replace_tag procedure [paimon]
nickdelnano opened a new pull request, #5666:
URL: https://github.com/apache/paimon/pull/5666
Relates to https://github.com/apache/paimon/pull/5570
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Call Iceberg callback on replace_tag procedure [paimon]
Posted by "nickdelnano (via GitHub)" <gi...@apache.org>.
nickdelnano commented on code in PR #5666:
URL: https://github.com/apache/paimon/pull/5666#discussion_r2107667266
##########
paimon-flink/paimon-flink-1.16/src/test/java/org/apache/paimon/flink/iceberg/Flink116IcebergITCase.java:
##########
@@ -36,4 +36,9 @@ public void testCreateTags(String format) throws Exception {
public void testDeleteTags(String format) throws Exception {
// Flink 1.16 does not support delete_tag procedure so we skip this test.
}
+
+ @Override
+ public void testReplaceTags(String format) throws Exception {
+ // Flink 1.17 does not support replace_tag procedure so we skip this test.
Review Comment:
```suggestion
// Flink 1.16 does not support replace_tag procedure so we skip this test.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Call Iceberg callback on replace_tag procedure [paimon]
Posted by "LsomeYeah (via GitHub)" <gi...@apache.org>.
LsomeYeah commented on code in PR #5666:
URL: https://github.com/apache/paimon/pull/5666#discussion_r2122533832
##########
paimon-core/src/main/java/org/apache/paimon/utils/TagManager.java:
##########
@@ -112,10 +113,17 @@ public void createTag(
}
/** Replace a tag from given snapshot and save it in the storage. */
- public void replaceTag(Snapshot snapshot, String tagName, Duration timeRetained) {
+ public void replaceTag(
+ Snapshot snapshot, String tagName, Duration timeRetained, List<TagCallback> callbacks) {
checkArgument(!StringUtils.isNullOrWhitespaceOnly(tagName), "Tag name shouldn't be blank.");
checkArgument(tagExists(tagName), "Tag '%s' doesn't exist.", tagName);
- createOrReplaceTag(snapshot, tagName, timeRetained, null);
+ createOrReplaceTag(
+ snapshot,
+ tagName,
+ timeRetained,
+ callbacks.stream()
+ .filter(callback -> IcebergCommitCallback.class.isInstance(callback))
Review Comment:
agree with the Copilot~, `callback instanceof IcebergCommitCallback` or `IcebergCommitCallback.class::isInstance` might be better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Call Iceberg callback on replace_tag procedure [paimon]
Posted by "nickdelnano (via GitHub)" <gi...@apache.org>.
nickdelnano commented on code in PR #5666:
URL: https://github.com/apache/paimon/pull/5666#discussion_r2107667581
##########
paimon-flink/paimon-flink-1.16/src/test/java/org/apache/paimon/flink/iceberg/Flink116IcebergITCase.java:
##########
@@ -36,4 +36,9 @@ public void testCreateTags(String format) throws Exception {
public void testDeleteTags(String format) throws Exception {
// Flink 1.16 does not support delete_tag procedure so we skip this test.
}
+
+ @Override
+ public void testReplaceTags(String format) throws Exception {
+ // Flink 1.17 does not support replace_tag procedure so we skip this test.
Review Comment:
fix flink version number in comment
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Call Iceberg callback on replace_tag procedure [paimon]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #5666:
URL: https://github.com/apache/paimon/pull/5666#discussion_r2107926732
##########
paimon-flink/paimon-flink-1.16/src/test/java/org/apache/paimon/flink/iceberg/Flink116IcebergITCase.java:
##########
@@ -36,4 +36,9 @@ public void testCreateTags(String format) throws Exception {
public void testDeleteTags(String format) throws Exception {
// Flink 1.16 does not support delete_tag procedure so we skip this test.
}
+
+ @Override
Review Comment:
Overriding `testReplaceTags` without `@ParameterizedTest` and `@ValueSource` means this test won’t run. Re-add the JUnit parameterized annotations to enable execution.
```suggestion
@Override
@Disabled("Flink 1.16 does not support replace_tag procedure, so this test is skipped.")
```
##########
paimon-flink/paimon-flink-1.17/src/test/java/org/apache/paimon/flink/iceberg/Flink117IcebergITCase.java:
##########
@@ -29,4 +29,9 @@ public void testCreateTags(String format) throws Exception {
public void testDeleteTags(String format) throws Exception {
// Flink 1.17 does not support delete_tag procedure so we skip this test.
}
+
+ @Override
+ public void testReplaceTags(String format) throws Exception {
Review Comment:
Overriding `testReplaceTags` without `@ParameterizedTest` and `@ValueSource` means this test won’t run. Re-add the JUnit parameterized annotations to enable execution.
##########
paimon-core/src/main/java/org/apache/paimon/utils/TagManager.java:
##########
@@ -112,10 +113,17 @@ public void createTag(
}
/** Replace a tag from given snapshot and save it in the storage. */
- public void replaceTag(Snapshot snapshot, String tagName, Duration timeRetained) {
+ public void replaceTag(
+ Snapshot snapshot, String tagName, Duration timeRetained, List<TagCallback> callbacks) {
checkArgument(!StringUtils.isNullOrWhitespaceOnly(tagName), "Tag name shouldn't be blank.");
checkArgument(tagExists(tagName), "Tag '%s' doesn't exist.", tagName);
- createOrReplaceTag(snapshot, tagName, timeRetained, null);
+ createOrReplaceTag(
+ snapshot,
+ tagName,
+ timeRetained,
+ callbacks.stream()
+ .filter(callback -> IcebergCommitCallback.class.isInstance(callback))
Review Comment:
[nitpick] For readability, consider using `callback instanceof IcebergCommitCallback` instead of `IcebergCommitCallback.class.isInstance(callback)`.
```suggestion
.filter(callback -> callback instanceof IcebergCommitCallback)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core] Call Iceberg callback on replace_tag procedure [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5666:
URL: https://github.com/apache/paimon/pull/5666
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org