You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, setting inferSchemaLength to 'null' throws an error.
<path>/node_modules/nodejs-polars/bin/io.js:139
return (0, dataframe_1._DataFrame)(method(pathOrBody, options));
^
Error: Failed to convert napi value Null into rust type `u32` on ReadJsonOptions.inferSchemaLength
at Object.readJSON (<path>/node_modules/nodejs-polars/bin/io.js:139:44)
This works of course: pl.readJSON(filePath, { format: "lines", inferSchemaLength: 0 });
but still, the documentation is inconsistent with the behavior.
Have you tried?
import pl from 'nodejs-polars';
pl.readJSON(filePath, { format: "lines" });
Have you tried latest version of polars?
What version of polars are you using?
0.15.0
What operating system are you using polars on?
MacOS Sonoma Version 14.4 (23E214)
What node version are you using
node v20.17.0
Describe your bug.
Cannot use null as ReadJsonOptions.inferSchemaLength
What are the steps to reproduce the behavior?
What is the actual behavior?
Currently, setting inferSchemaLength to 'null' throws an error.
What is the expected behavior?
According to docs, it should be working with 'null'
https://github.com/pola-rs/nodejs-polars/blob/main/polars/io.ts#L287
The text was updated successfully, but these errors were encountered: