You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "snazy (via GitHub)" <gi...@apache.org> on 2026/06/26 15:17:52 UTC

[PR] Migrate core serialization helpers to Jackson 3 [polaris]

snazy opened a new pull request, #4910:
URL: https://github.com/apache/polaris/pull/4910

   Move core pagination, storage configuration, connection configuration, event, policy, and GCP credential JSON helpers to Jackson 3.
   
   This keeps Jackson 2 in place for Iceberg/Quarkus-bound paths while adding runtime dependency and LICENSE entries needed by the migrated core types.
   
   Migration guide: https://github.com/FasterXML/jackson/blob/main/jackson3/MIGRATING_TO_JACKSON_3.md
   


-- 
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-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate core serialization helpers to Jackson 3 [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on code in PR #4910:
URL: https://github.com/apache/polaris/pull/4910#discussion_r3518018175


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/bootstrap/RootCredentials.java:
##########
@@ -27,6 +27,8 @@
 @PolarisImmutable
 @JsonSerialize(as = ImmutableRootCredentials.class)
 @JsonDeserialize(as = ImmutableRootCredentials.class)
+@tools.jackson.databind.annotation.JsonSerialize(as = ImmutableRootCredentials.class)

Review Comment:
   Short: this makes the types (de)serializable by both Jackson 2 and 3.
   
   It's more a compatbility-safety thing in this case, but other types are handled by Jackson 2 (REST layer) and Jackson 3 (internal-ish).
   
   It's a bit sad it's necessary for this particular case (`@JsonSerialize` / `@JsonDeserialize` just using the `as` attribute), but those annotations also reference Jackson 2/3 specific types.



##########
runtime/server/distribution/LICENSE:
##########
@@ -539,6 +539,8 @@ This product bundles Jackson.
 * Maven group:artifact IDs: com.fasterxml.jackson.module:jackson-module-parameter-names
 * Maven group:artifact IDs: tools.jackson.core:jackson-core
 * Maven group:artifact IDs: tools.jackson.core:jackson-databind
+* Maven group:artifact IDs: tools.jackson.dataformat:jackson-dataformat-smile
+* Maven group:artifact IDs: tools.jackson.dataformat:jackson-dataformat-yaml

Review Comment:
   `RootCredentialsSet.fromInputStream()` parses YAML using Jackson



-- 
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-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate core serialization helpers to Jackson 3 [polaris]

Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #4910:
URL: https://github.com/apache/polaris/pull/4910#discussion_r3507354873


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/bootstrap/RootCredentials.java:
##########
@@ -27,6 +27,8 @@
 @PolarisImmutable
 @JsonSerialize(as = ImmutableRootCredentials.class)
 @JsonDeserialize(as = ImmutableRootCredentials.class)
+@tools.jackson.databind.annotation.JsonSerialize(as = ImmutableRootCredentials.class)

Review Comment:
   Just curious, why do we need to keep both?



##########
runtime/server/distribution/LICENSE:
##########
@@ -539,6 +539,8 @@ This product bundles Jackson.
 * Maven group:artifact IDs: com.fasterxml.jackson.module:jackson-module-parameter-names
 * Maven group:artifact IDs: tools.jackson.core:jackson-core
 * Maven group:artifact IDs: tools.jackson.core:jackson-databind
+* Maven group:artifact IDs: tools.jackson.dataformat:jackson-dataformat-smile
+* Maven group:artifact IDs: tools.jackson.dataformat:jackson-dataformat-yaml

Review Comment:
   YAML? Where are we using Jackson to parse YAML?



-- 
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-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate core serialization helpers to Jackson 3 [polaris]

Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on code in PR #4910:
URL: https://github.com/apache/polaris/pull/4910#discussion_r3522062021


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/EventEntity.java:
##########
@@ -142,7 +141,7 @@ public Map<String, String> getAdditionalPropertiesAsMap() {
     String properties = getAdditionalProperties();
     try {
       return MAPPER.readValue(properties, new TypeReference<>() {});
-    } catch (JsonProcessingException ex) {
+    } catch (Exception ex) {

Review Comment:
   Curious: Why didn't you moved to `JacksonException`, It was there in the doc as well
   ```
   Base exception (JsonProcessingException in 2.x, renamed as JacksonException) now extends RuntimeException and NOT IOException (like 2.x did)
   ```
   
   Now it can/will catch non jackson errors and throw an `IllegalStateException` as if it was some input issue



-- 
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-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate core serialization helpers to Jackson 3 [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy merged PR #4910:
URL: https://github.com/apache/polaris/pull/4910


-- 
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-unsubscribe@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org