[JS] Values returned as undefined when arrow file bigger than 2gb
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, python, typescript
- Domain
- data
Research direction
Start with the JavaScript SDK entry points RecordBatchReader.from, tableFromIPC, and table.get(0).toArray(), using the provided Python generator and large-file reader example to reproduce the failure. Done means the 2GB-plus Arrow file still reports the correct row count and returns its values instead of undefined.
Written by the indexing model from the issue text.
Description
Steps:
- Generate arrow file bigger than 2gb
import pyarrow as pa
nums1 = [42]
nums2 = [42.42]
mil = 1000000
for n in range(1, 140 * mil):
nums1.append(n)
nums2.append(1 / n)
arr1 = pa.array(nums1)
arr2 = pa.array(nums2)
schema = pa.schema([
pa.field('nums1', arr1.type),
pa.field('nums2', arr2.type),
])
with pa.OSFile('arraydata.arrow', 'wb') as sink:
with pa.ipc.new_file(sink, schema=schema) as writer:
batch = pa.record_batch([arr1, arr2], schema=schema)
writer.write(batch)
- Try to read it via the JS SDK
const fs = require("fs");
const { tableFromIPC, RecordBatchReader } = require("apache-arrow");
const filePath = "./arraydata.arrow";
const stream = fs.createReadStream(filePath);
const reader = RecordBatchReader.from(stream);
(async function () {
const table = await tableFromIPC(reader);
console.log("numRows", table.numRows);
console.log("first row", table.get(0).toArray());
})();
The code above prints:
numRows 140000000
first row [ undefined, undefined ]
numRows is correct, but the values are coming out as {}undefined{}.
Reporter: Denis Gursky
Note: This issue was originally created as ARROW-18007. Please see the migration documentation for further details.
- Dominant language
- TypeScript
- Stars
- 114
- Forks
- 35
- Avg merge
- 13h 35m
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-js
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
The IPC reader accepts a column that is shorter than its RecordBatch, and fills the missing rows with nullsPossibly taken @Sealdot claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
The IPC reader ignores Schema.endianness: a big-endian stream reads 1, 2, 3 as 16777216, 33554432, 50331648Possibly taken @aniket-r2Dev2 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
tableFromIPC loops with no end on a file whose RecordBatch block points at a DictionaryBatchPossibly taken @aniket-r2Dev2 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
apache/arrow-js#547 · 1 comment ·
Maintainers usually reply within 1 day
-
The stream reader drops a message of an unexpected type but not its body, and parses the body as the next messagesPossibly taken @Umer-Butt07 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
earendil-works/gondolin#222 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endora-commerce/endora-commerce#2203 ·
Maintainers usually reply within 1 day
-
enhancement priority:medium ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
wondermoney/wondermoney#1079 ·
Maintainers usually reply within 1 day