-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Using Node.JS
What version of polars are you using?
"nodejs-polars": "^0.2.0"
What operating system are you using polars on?
MacOS Big Sur 11.1
Describe your bug.
Reading in a buffer from an .ipc (ArrowStream) file using readIPC fails with Error: Arrow file does not contain correct header. At the same time the file is not corrupt since it can be loaded using apache-arrow's Table.from method
What are the steps to reproduce the behavior?
See code example below. I'll post both the .arrow file (works) and .ipc file (doesn't work) as attachment
const pl = require('nodejs-polars');
const { Table } = require('apache-arrow')
const { readFileSync } = require('fs');
const fromArrow = readFileSync('hits.arrow');
const fromIPC = readFileSync('hits.ipc');
// Read Arrow file by Arrow.js -> works
const df = Table.from([fromArrow])
console.log("df", df.count()) // 10
// Read Arrow file by polars -> works
const dfPolars = pl.readIPC(fromArrow)
console.log("dfPolars", dfPolars) // prints nice table with 10 entries
// Read IPC (ArrowStream) file by Arrow.js -> works
const dfIpc = Table.from([fromIPC])
console.log("dfIpc", dfIpc.count()) // 10
// Read IPC (ArrowStream) by polars -> Fails
const dfIpcPolars = pl.readIPC(fromIPC)
console.log("dfIpcPolars", dfIpcPolars) // Error: Arrow file does not contain correct header
drewbitt
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request