nastra commented on code in PR #18665:
URL: https://github.com/apache/iceberg/pull/18665#discussion_r4456120173
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -1165,12 +1166,19 @@ public Transaction createTransaction() {
@Override
public Transaction replaceTransaction() {
Endpoint.check(endpoints, Endpoint.V1_UPDATE_TABLE);
- if (viewExists(context, ident)) {
- throw new AlreadyExistsException("View with same name already exists:
%s", ident);
- }
Review Comment:
I think this permission model was an edge case that we haven't considered
back when adding this check as part of
https://github.com/apache/iceberg/pull/9012. I think the issue is that we
weren't able to move this check to the server when replacing a table/view and
checking whether a view/table exists with the same name. Doing the probes on
the client was the only way in order to throw the `AlreadyExistsException` when
the table/view exists and thus align all catalog implementations to behave the
same way.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]