amogh-jahagirdar commented on code in PR #13386: URL: https://github.com/apache/iceberg/pull/13386#discussion_r2166915020
########## core/src/main/java/org/apache/iceberg/rest/ParserContext.java: ########## @@ -23,7 +23,7 @@ import java.util.Map; import org.apache.hadoop.util.Preconditions; -class ParserContext { +public class ParserContext { Review Comment: Yeah technically anyone can use the packaged HttpClient independently make a request on their own and pass through their own `ParserContext`. So from an API design perspective I agree, we should just make this public to enable people to be able to just build their own if they want. Iceberg implementation can take an internal opinionated approach in the general client path but it's always available for a user to specify their own context if they so choose. ########## core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java: ########## @@ -149,10 +149,16 @@ protected abstract <T extends RESTResponse> T execute( Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders); - protected abstract <T extends RESTResponse> T execute( + protected <T extends RESTResponse> T execute( HTTPRequest request, Class<T> responseType, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders, - ParserContext parserContext); + ParserContext parserContext) { + if (null != parserContext) { + throw new UnsupportedOperationException("Parser context is not supported"); + } + + return execute(request, responseType, errorHandler, responseHeaders); Review Comment: Nice, this is a more elegant way to completely avoid the API breakage. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org