You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by am...@apache.org on 2025/06/25 17:49:15 UTC
(iceberg) branch main updated: Core: Fix API breakage introduced by #13191 (#13386)
This is an automated email from the ASF dual-hosted git repository.
amoghj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new 4278e91dda Core: Fix API breakage introduced by #13191 (#13386)
4278e91dda is described below
commit 4278e91ddaafe7f95e29383c6604a6bbabf4fd77
Author: Eduard Tudenhoefner <et...@gmail.com>
AuthorDate: Wed Jun 25 19:49:09 2025 +0200
Core: Fix API breakage introduced by #13191 (#13386)
---
.palantir/revapi.yml | 6 ------
core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java | 10 ++++++++--
core/src/main/java/org/apache/iceberg/rest/ParserContext.java | 9 +++------
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/.palantir/revapi.yml b/.palantir/revapi.yml
index 3b6db5681f..1b9ef4604c 100644
--- a/.palantir/revapi.yml
+++ b/.palantir/revapi.yml
@@ -1285,12 +1285,6 @@ acceptedBreaks:
- code: "java.field.removedWithConstant"
old: "field org.apache.iceberg.TableProperties.ROW_LINEAGE"
justification: "Removing deprecations for 1.10.0"
- - code: "java.method.abstractMethodAdded"
- new: "method <T extends org.apache.iceberg.rest.RESTResponse> T org.apache.iceberg.rest.BaseHTTPClient::execute(org.apache.iceberg.rest.HTTPRequest,\
- \ java.lang.Class<T>, java.util.function.Consumer<org.apache.iceberg.rest.responses.ErrorResponse>,\
- \ java.util.function.Consumer<java.util.Map<java.lang.String, java.lang.String>>,\
- \ org.apache.iceberg.rest.ParserContext)"
- justification: "Add context aware parsing"
- code: "java.method.removed"
old: "method boolean org.apache.iceberg.TableMetadata::rowLineageEnabled()"
justification: "Removing deprecations for 1.10.0"
diff --git a/core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java b/core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java
index ca832d7a4e..de92f86dec 100644
--- a/core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java
+++ b/core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java
@@ -149,10 +149,16 @@ public abstract class BaseHTTPClient implements RESTClient {
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);
+ }
}
diff --git a/core/src/main/java/org/apache/iceberg/rest/ParserContext.java b/core/src/main/java/org/apache/iceberg/rest/ParserContext.java
index c42a22eb84..25c533fe36 100644
--- a/core/src/main/java/org/apache/iceberg/rest/ParserContext.java
+++ b/core/src/main/java/org/apache/iceberg/rest/ParserContext.java
@@ -22,8 +22,9 @@ import com.fasterxml.jackson.databind.InjectableValues;
import java.util.Collections;
import java.util.Map;
import org.apache.hadoop.util.Preconditions;
+import org.apache.iceberg.relocated.com.google.common.collect.Maps;
-class ParserContext {
+public class ParserContext {
private final Map<String, Object> data;
@@ -44,11 +45,7 @@ class ParserContext {
}
static class Builder {
- private Map<String, Object> data;
-
- private Builder() {
- this.data = Collections.emptyMap();
- }
+ private final Map<String, Object> data = Maps.newHashMap();
public Builder add(String key, Object value) {
Preconditions.checkNotNull(key, "Key cannot be null");