trxcllnt commented on code in PR #45889:
URL: https://github.com/apache/arrow/pull/45889#discussion_r2010732642


##########
js/src/builder/fixedsizelist.ts:
##########
@@ -24,10 +24,16 @@ export class FixedSizeListBuilder<T extends DataType = any, 
TNull = any> extends
     public setValue(index: number, value: T['TValue']) {
         const [child] = this.children;
         const start = index * this.stride;
-        for (let i = -1, n = value.length; ++i < n;) {
+        for (let i = -1, n = this.stride; ++i < n;) {
             child.set(start + i, value[i]);
         }
     }

Review Comment:
   The contract is that `setValue()` is only 
[called](https://github.com/apache/arrow/blob/0de45b90255c69f45c2e9073dd21be8784ebc8e0/js/src/builder.ts#L246)
 if the value is not null.



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