domoritz commented on a change in pull request #12451: URL: https://github.com/apache/arrow/pull/12451#discussion_r810560073
########## File path: js/src/builder/struct.ts ########## @@ -25,11 +25,18 @@ import { Struct, TypeMap } from '../type.js'; export class StructBuilder<T extends TypeMap = any, TNull = any> extends Builder<Struct<T>, TNull> { public setValue(index: number, value: Struct<T>['TValue']) { const children = this.children; - switch (Array.isArray(value) || value.constructor) { - case true: return this.type.children.forEach((_, i) => children[i].set(index, value[i])); - case Map: return this.type.children.forEach((f, i) => children[i].set(index, value.get(f.name))); - default: return this.type.children.forEach((f, i) => children[i].set(index, value[f.name])); + switch (Array.isArray(value) || value.constructor) { + case true: return this.type.children.forEach((_, i) => children[i].set(index, value[i])); + case Map: return this.type.children.forEach((f, i) => children[i].set(index, value.get(f.name))); + default: return this.type.children.forEach((f, i) => children[i].set(index, value[f.name])); + } Review comment: Please un-indent the block so it's aligned with the previous line. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org