Adam M Krebs created ARROW-6574: ----------------------------------- Summary: [JS] TypeError with utf8 and JSONVectorLoader.readData Key: ARROW-6574 URL: https://issues.apache.org/jira/browse/ARROW-6574 Project: Apache Arrow Issue Type: Bug Components: JavaScript Affects Versions: 0.14.1 Environment: node v10.16.0, OSX 10.14.5 Reporter: Adam M Krebs
Minimal repro: {code:javascript} const fields = [ { name: 'first_name', type: {name: 'utf8'}, nullable: false, children: [], }, ]; Table.from({ schema: {fields}, batches: [{ count: 1, columns: [{ name: 'first_name', count: 1, VALIDITY: [], DATA: ['Fred'] }] }] });{code} Output: {code:java} /[snip]/node_modules/apache-arrow/visitor/vectorloader.js:92 readData(type, { offset } = this.nextBufferRange()) { ^TypeError: Cannot destructure property `offset` of 'undefined' or 'null'. at JSONVectorLoader.readData (/[snip]/node_modules/apache-arrow/visitor/vectorloader.js:92:38) at JSONVectorLoader.visitUtf8 (/[snip]/node_modules/apache-arrow/visitor/vectorloader.js:46:188) at JSONVectorLoader.visit (/[snip]/node_modules/apache-arrow/visitor.js:28:48) at JSONVectorLoader.visit (/[snip]/node_modules/apache-arrow/visitor/vectorloader.js:40:22) at nodes.map (/[snip]/node_modules/apache-arrow/visitor.js:25:44) at Array.map (<anonymous>) at JSONVectorLoader.visitMany (/[snip]/node_modules/apache-arrow/visitor.js:25:22) at RecordBatchJSONReaderImpl._loadVectors (/[snip]/node_modules/apache-arrow/ipc/reader.js:523:107) at RecordBatchJSONReaderImpl._loadRecordBatch (/[snip]/node_modules/apache-arrow/ipc/reader.js:209:79) at RecordBatchJSONReaderImpl.next (/[snip]/node_modules/apache-arrow/ipc/reader.js:280:42){code} Looks like the `nextBufferRange` call is returning `undefined`, due to an out-of-bounds `buffersIndex`. Happy to provide more info if needed. Seems to only affect utf8 types and nothing else. -- This message was sent by Atlassian Jira (v8.3.2#803003)