sungwy commented on code in PR #18665:
URL: https://github.com/apache/iceberg/pull/18665#discussion_r4391291950
##########
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 thought it would make sense to just simply remove this check instead.
The catalog server should be able to tell if the view already exists, and
return the correct response code (409 would be my guess).
I see that the check was added back in
https://github.com/apache/iceberg/pull/9012, but I disagree with the existing
approach of the client side continuing to send another request to the IRC
server, when the server can check when the updateTable operation is being
executed and figure out of the request can be processed.
cc @nastra
--
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]