Yifeng-Sigma commented on code in PR #38839:
URL: https://github.com/apache/arrow/pull/38839#discussion_r1401537559
##########
go/arrow/array/data.go:
##########
@@ -190,6 +190,24 @@ func (d *Data) SetDictionary(dict arrow.ArrayData) {
}
}
+// Returns the size of Data in bytes
+func (d *Data) Size() uint64 {
+ var size uint64
+
+ if d == nil {
+ return 0
+ }
+
+ for _, b := range d.Buffers() {
+ size += uint64(b.Len())
+ }
+ for _, c := range d.Children() {
+ size += c.Size()
+ }
+ size += d.Dictionary().Size()
Review Comment:
Good catch, addressed.
--
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]