This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 2b0ca2102 removed references of BEFORE/AFTER_COMMIT_VIEW (#3554)
2b0ca2102 is described below
commit 2b0ca21028f3ecab6c1a79f51ddad9dc364c228d
Author: Innocent Djiofack <[email protected]>
AuthorDate: Wed Jan 28 07:13:28 2026 -0700
removed references of BEFORE/AFTER_COMMIT_VIEW (#3554)
---
CHANGELOG.md | 1 +
.../service/catalog/iceberg/IcebergCatalog.java | 20 ------------
.../polaris/service/events/PolarisEventType.java | 4 +--
.../iceberg/AbstractIcebergCatalogViewTest.java | 36 ----------------------
4 files changed, 3 insertions(+), 58 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82a0d7dcb..02ffef1ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ request adding CHANGELOG notes for breaking (!) changes and
possibly other secti
### Breaking changes
+- The (Before/After)CommitViewEvent has been removed.
- The (Before/After)CommitTableEvent has been removed.
- The `PolarisMetricsReporter.reportMetric()` method signature has been
extended to include a `receivedTimestamp` parameter of type `java.time.Instant`.
diff --git
a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
index c375180b9..8de9687a8 100644
---
a/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
+++
b/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java
@@ -1852,16 +1852,6 @@ public class IcebergCatalog extends
BaseMetastoreViewCatalog
}
public void doCommit(ViewMetadata base, ViewMetadata metadata) {
- polarisEventListener.onEvent(
- new PolarisEvent(
- PolarisEventType.BEFORE_COMMIT_VIEW,
- eventMetadataFactory.create(),
- new AttributeMap()
- .put(EventAttributes.CATALOG_NAME, catalogName)
- .put(EventAttributes.VIEW_IDENTIFIER, identifier)
- .put(EventAttributes.VIEW_METADATA_BEFORE, base)
- .put(EventAttributes.VIEW_METADATA_AFTER, metadata)));
-
// TODO: Maybe avoid writing metadata if there's definitely a
transaction conflict
LOGGER.debug(
"doCommit for view {} with metadataBefore {}, metadataAfter {}",
@@ -1959,16 +1949,6 @@ public class IcebergCatalog extends
BaseMetastoreViewCatalog
} else {
updateTableLike(identifier, entity);
}
-
- polarisEventListener.onEvent(
- new PolarisEvent(
- PolarisEventType.AFTER_COMMIT_VIEW,
- eventMetadataFactory.create(),
- new AttributeMap()
- .put(EventAttributes.CATALOG_NAME, catalogName)
- .put(EventAttributes.VIEW_IDENTIFIER, identifier)
- .put(EventAttributes.VIEW_METADATA_BEFORE, base)
- .put(EventAttributes.VIEW_METADATA_AFTER, metadata)));
}
protected String writeNewMetadataIfRequired(ViewMetadata metadata) {
diff --git
a/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventType.java
b/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventType.java
index 949b9cb24..36d06595d 100644
---
a/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventType.java
+++
b/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventType.java
@@ -145,8 +145,8 @@ public enum PolarisEventType {
AFTER_RENAME_VIEW,
BEFORE_REPLACE_VIEW,
AFTER_REPLACE_VIEW,
- BEFORE_COMMIT_VIEW,
- AFTER_COMMIT_VIEW,
+ BEFORE_COMMIT_VIEW, // REMOVED FROM SOURCE CODE
+ AFTER_COMMIT_VIEW, // REMOVED FROM SOURCE CODE
BEFORE_REFRESH_VIEW,
AFTER_REFRESH_VIEW,
diff --git
a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
index b5a6c4a24..0648ed343 100644
---
a/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
+++
b/runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/AbstractIcebergCatalogViewTest.java
@@ -267,41 +267,5 @@ public abstract class AbstractIcebergCatalogViewTest
extends ViewCatalogTests<Ic
Assertions.assertThat(
afterRefreshEvent.attributes().getRequired(EventAttributes.VIEW_IDENTIFIER))
.isEqualTo(TestData.TABLE);
-
- PolarisEvent beforeCommitEvent =
-
testPolarisEventListener.getLatest(PolarisEventType.BEFORE_COMMIT_VIEW);
- Assertions.assertThat(
-
beforeCommitEvent.attributes().getRequired(EventAttributes.VIEW_IDENTIFIER))
- .isEqualTo(TestData.TABLE);
- Assertions.assertThat(
- beforeCommitEvent
- .attributes()
- .get(EventAttributes.VIEW_METADATA_BEFORE)
- .map(m -> m.properties().get(key)))
- .hasValue(valOld);
- Assertions.assertThat(
- beforeCommitEvent
- .attributes()
- .get(EventAttributes.VIEW_METADATA_AFTER)
- .map(m -> m.properties().get(key)))
- .hasValue(valNew);
-
- PolarisEvent afterCommitEvent =
- testPolarisEventListener.getLatest(PolarisEventType.AFTER_COMMIT_VIEW);
- Assertions.assertThat(
-
afterCommitEvent.attributes().getRequired(EventAttributes.VIEW_IDENTIFIER))
- .isEqualTo(TestData.TABLE);
- Assertions.assertThat(
- afterCommitEvent
- .attributes()
- .get(EventAttributes.VIEW_METADATA_BEFORE)
- .map(m -> m.properties().get(key)))
- .hasValue(valOld);
- Assertions.assertThat(
- afterCommitEvent
- .attributes()
- .get(EventAttributes.VIEW_METADATA_AFTER)
- .map(m -> m.properties().get(key)))
- .hasValue(valNew);
}
}