dimas-b commented on code in PR #3195:
URL: https://github.com/apache/polaris/pull/3195#discussion_r2599790449
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergRestCatalogEventServiceDelegator.java:
##########
@@ -597,11 +615,30 @@ public Response commitTransaction(
polarisEventListener.onBeforeCommitTransaction(
new IcebergRestCatalogEvents.BeforeCommitTransactionEvent(
eventMetadataFactory.create(), catalogName,
commitTransactionRequest));
+ for (UpdateTableRequest req : commitTransactionRequest.tableChanges()) {
+ polarisEventListener.onBeforeUpdateTable(
+ new BeforeUpdateTableEvent(
+ eventMetadataFactory.create(),
+ catalogName,
+ req.identifier().namespace(),
+ req.identifier().name(),
+ req));
+ }
Response resp =
delegate.commitTransaction(prefix, commitTransactionRequest,
realmContext, securityContext);
polarisEventListener.onAfterCommitTransaction(
new IcebergRestCatalogEvents.AfterCommitTransactionEvent(
eventMetadataFactory.create(), catalogName,
commitTransactionRequest));
+ for (UpdateTableRequest req : commitTransactionRequest.tableChanges()) {
+ polarisEventListener.onAfterUpdateTable(
+ new AfterUpdateTableEvent(
+ eventMetadataFactory.create(),
+ catalogName,
+ req.identifier().namespace(),
+ req.identifier().name(),
+ req,
+ null));
Review Comment:
Sorry for missing the earlier comment :facepalm:
If our intention is to provide the same set of parameters (non-null) to
events of the same type in all situations, then given that this PR deviates
from that goal, I believe we ought to mark this on the javadoc of
[AfterUpdateTableEvent](https://github.com/apache/polaris/blob/07dd8ef0b9cb9a8349750594ae76a3d870186538/runtime/service/src/main/java/org/apache/polaris/service/events/IcebergRestCatalogEvents.java#L341)
at least.
A CHANGELOG entry is not required, IMHO, since it's developer-level change
at this stage.
That said, the plan SGTM :+1:
--
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]