Rafferty97 commented on PR #9496:
URL: https://github.com/apache/arrow-rs/pull/9496#issuecomment-3995139330

   > The row handling logic seems really redundant between normal and 
flattened-array modes... trying to figure out if there's a better way to 
express it?
   > 
   > Also -- what would be the intended semantics of flattened-array parsing a 
json file containing multiple arrays?
   > ```json
   > [{"a": 1}, {"a": 2}]
   > [{"a": 3}, {"a": 4}]
   > ```
   > (I think the current code would produce four rows of output, but is that 
correct if the file is "supposed" to contain only one large array?)
   
   There's a little bit of code duplication but I think it's quite manageable 
and warranted.
   
   The intended semantics for that example would be to produce 4 rows, whereas 
the current code would either error out because the top-level items aren't 
objects, or return two arrays if it's in "is_field" mode via the 
ReaderBuilder::new_as_field method.


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