jarohen commented on code in PR #40987:
URL: https://github.com/apache/arrow/pull/40987#discussion_r1551954105


##########
java/vector/src/main/java/org/apache/arrow/vector/ipc/JsonFileReader.java:
##########
@@ -98,10 +100,14 @@ public class JsonFileReader implements AutoCloseable, 
DictionaryProvider {
   public JsonFileReader(File inputFile, BufferAllocator allocator) throws 
JsonParseException, IOException {
     super();
     this.allocator = allocator;
-    MappingJsonFactory jsonFactory = new MappingJsonFactory(new ObjectMapper()
-        //ignore case for enums
-        .configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true)
-    );
+    //ignore case for enums
+    ObjectMapper mapper = new 
ObjectMapper().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true);
+    mapper.registerSubtypes(

Review Comment:
   If I back this part of the change out, I get the following error:
   
   `InvalidTypeId Could not resolve type id 'TestExtensionType$UuidType' as a 
subtype of `org.apache.arrow.vector.types.pojo.ArrowType`: known type ids = 
[binary, bool, date, decimal, duration, fixedsizebinary, fixedsizelist, 
floatingpoint, int, interval, largebinary, largelist, largeutf8, list, map, 
null, struct, time, timestamp, union, utf8] (for POJO property 'type')`
   
   The schema it writes out is as follows:
   
   ```json
   "schema" : {
       "fields" : [{
         "name" : "uuid",
         "nullable" : true,
         "type" : {
           "name" : "TestExtensionType$UuidType"
         },
         "children" : [ ],
         "metadata" : [{
           "value" : "uuid",
           "key" : "ARROW:extension:name"
         },{
           "value" : "",
           "key" : "ARROW:extension:metadata"
         }]
       }]
     }
   ```
   
   Maybe this should say `type: "fixedsizebinary"` instead?



-- 
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]

Reply via email to