You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Liya Fan (Jira)" <ji...@apache.org> on 2021/01/08 02:00:00 UTC
[jira] [Resolved] (ARROW-11114) [Java] Metadata serialization is
broken for Field class
[ https://issues.apache.org/jira/browse/ARROW-11114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liya Fan resolved ARROW-11114.
------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
Issue resolved by pull request 9088
[https://github.com/apache/arrow/pull/9088]
> [Java] Metadata serialization is broken for Field class
> -------------------------------------------------------
>
> Key: ARROW-11114
> URL: https://issues.apache.org/jira/browse/ARROW-11114
> Project: Apache Arrow
> Issue Type: Bug
> Components: Java
> Affects Versions: 2.0.0
> Reporter: Nick Bruno
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.0.0
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> org.apache.arrow.vector.types.pojo.Field uses asymmetric serialization and deserialization for the metadata field, causing it to fail to deserialize with the following error:
> {noformat}
> Exception in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT tokenException in thread "main" com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token at [Source: (File); line: 10, column: 20] (through reference chain: org.apache.arrow.vector.types.pojo.Schema["fields"]->java.util.ArrayList[0]->org.apache.arrow.vector.types.pojo.Field["metadata"]) {noformat}
> This is because the class [serializes metadata|https://github.com/apache/arrow/blob/dfef236f7587e4168ac1e07bd09e42d9373beb70/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java#L274] as {{Map<String, String>}} but [expects to deserialize it|https://github.com/apache/arrow/blob/dfef236f7587e4168ac1e07bd09e42d9373beb70/java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Field.java#L87] as {{List<Map<String, String>>}}.
> MCVE: [https://gist.github.com/nbruno/983cb7faf41dc20a0810ae80fe33562d]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)