zeroshade commented on issue #38836:
URL: https://github.com/apache/arrow/issues/38836#issuecomment-1821730163

   My recommendation would be a variation on the first one:
   
   ```go
   func calcSize(arr arrow.ArrayData) (sz uint64) {
       if arr == nil {
           return
       }
   
       for _, b := range arr.Buffers() {
           sz += uint64(b.Len())
       }
       for _, c := range arr.Children() {
           sz += calcSize(c)
       }
       sz += calcSize(arr.Dictionary())
       return
   }
   ```
   
   That would be my recommendation, it might be reasonable to add this as a 
utility into the arrow library directly via a PR


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