markmckeown opened a new issue, #4952:
URL: https://github.com/apache/polaris/issues/4952
### Describe the bug
If I create a PolarisEvent (for testing) as follows:
```
PolarisEvent event = new PolarisEvent(
PolarisEventType.AFTER_REFRESH_TABLE,
ImmutablePolarisEventMetadata.builder().realmId(REALM).user(PRINCIPAL).build(),
new EventAttributeMap()
.put(EventAttributes.CATALOG_NAME, "test_catalog")
.put(EventAttributes.TABLE_IDENTIFIER, testTable));
```
If I then call event.metadata().eventId() I get a different UUID each time
This patch fixes my tests - but I maybe I have not missed something?
```
diff --git
a/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventMetadata.java
b/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventMetadata.java
index 22551134..40de2d32 100644
---
a/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventMetadata.java
+++
b/runtime/service/src/main/java/org/apache/polaris/service/events/PolarisEventMetadata.java
@@ -39,6 +39,7 @@ public interface PolarisEventMetadata {
}
/** The unique ID of the event. */
+ @Value.Default
default UUID eventId() {
return UUID.randomUUID();
}
```
If it helps I can turn this into a PR.
### To Reproduce
_No response_
### Actual Behavior
_No response_
### Expected Behavior
_No response_
### Additional context
_No response_
### System information
_No response_
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]