trxcllnt commented on code in PR #320:
URL: https://github.com/apache/arrow-js/pull/320#discussion_r2484248746
##########
src/data.ts:
##########
@@ -97,6 +98,11 @@ export class Data<T extends DataType = DataType> {
values && (byteLength += values.byteLength);
nullBitmap && (byteLength += nullBitmap.byteLength);
typeIds && (byteLength += typeIds.byteLength);
+ if (this.variadicBuffers.length > 0) {
+ for (const buffer of this.variadicBuffers) {
+ buffer && (byteLength += buffer.byteLength);
+ }
+ }
Review Comment:
```suggestion
byteLength += this.variadicBuffers.reduce((size, data) => size +
(data?.byteLength ?? 0), 0);
```
--
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]