paleolimbot commented on issue #25078:
URL: https://github.com/apache/arrow/issues/25078#issuecomment-2605748640

   > What do you mean by "flatten everything into one object"?
   
   In integration test JSON (which vaguely follows flatbuffers), you have:
   
   ```json
   {
     "name" : "name_of_the_field",
     "nullable" : true,
     "type" : {
       "name" : "duration",
       "unit" : "MILLISECOND"
     }
   }
   ```
   
   The C Data interface puts that all in one object conceptually:
   
   ```json
   {
     "format": "tDm",
     "name": "name_of_the_field",
     "flags": 2
   }
   ```
   
   And you could do something in the middle, although I'm not personally keen 
to come up with all the rules/names needed to define all these (e.g., 
"milliseconds"? "milis"? "ms"? "m"?).
   
   ```json
   {
     "format": "duration",
     "timeUnit": "milliseconds",
     "name": "name_of_the_field",
     "nullable": true
   }
   ```
   
   The least effort spec development and implementation-wise is (probably) a 
literal translation of the C data interface. It might be worth re-floating that 
idea with the possibility of allowing future substitutions for readability in 
the event anybody ends up caring about that (e.g., `"format"` could accept a 
JSON object like `{"duration": {"timeUnit": "ms"}}`.
   


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