zeroshade commented on issue #448:
URL: https://github.com/apache/arrow-go/issues/448#issuecomment-3111082062

   Looking at the issue you linked, the problem is the loop in the JSON path: 
   
   ```go
   for rdr.Next() {
           rec := rdr.Record()
           if kept == nil { // intentionally keep first batch
               rec.Retain()
               records = append(records, rec)
           }
       }
   ```
   
   I assume there's a typo there that it would be doing `kept = rec` or 
something? 
   
   Basically, every record in the loop needs to have `Retain` called on it, 
otherwise every call to `Next` will release it. There's no reason to keep the 
first batch. 
   
   Also, there's a `TableFromJSON` function that could be used potentially if 
you want, where each element of the `[]string` will be one chunk.


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