flyingImer commented on code in PR #4238: URL: https://github.com/apache/polaris/pull/4238#discussion_r3478644293
########## runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/ETaggedLoadTableResponse.java: ########## @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.polaris.service.catalog.iceberg; + +import java.util.Optional; +import org.apache.iceberg.rest.responses.LoadTableResponse; + +/** + * Pairs a {@link LoadTableResponse} with an optional entity tag derived from the response's + * metadata location. The handler is responsible for computing the etag (when possible); transport + * layers such as the REST adapter translate the etag into an HTTP {@code ETag} header. + */ +public record ETaggedLoadTableResponse(LoadTableResponse response, Optional<String> etag) {} Review Comment: Optional<String> etag is the narrow form. I fell a canonical one with an open extension slot (LoadTableResult<E>, empty default) can benefit broader. This provides iceberg catalog impl provider an official operation metadata channel to pass down info like Etag cross boundary (runtime/ and core/) easily without hacking around. And create, register, and later metadata reuse one carrier instead of a wrapper per field if needed. -- 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]
