kylebarron / parquet-wasm

Rust-based WebAssembly bindings to read and write Apache Parquet data
https://kylebarron.dev/parquet-wasm/
Apache License 2.0
482 stars 19 forks source link

Changelog notes: #445

Closed kylebarron closed 2 months ago

kylebarron commented 5 months ago

List of breaking changes:

matbee-eth commented 4 months ago

I dont understand how to get this project imported. Documentation says arrow2, arrow1, etc. But I see no such thing. and import { readParquet } from "parquet-wasm"; returns

Cannot find module 'parquet-wasm' or its corresponding type declarations.ts(2307)

Using this in a NextJS webpack system and it most definitely does not enjoy it

I've tried copying the files directly into my project and it errors:

parquet_wasm.js:300  Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '__wbindgen_add_to_stack_pointer')
    at readParquet (parquet_wasm.js:300:14)
    at eval (VM949045 parquet.tsx:44:103)
    at async Promise.all (index 0)
    at async eval (VM949045 parquet.tsx:42:30)
    import { readParquet } from "parquet-wasm/bundler/parquet_wasm";

errors with the following:

Module not found: Package path ./bundler/parquet_wasm is not exported from package /home/acidhax/dev/originals/dataset-manager-nextjs/node_modules/parquet-wasm (see exports field in /home/acidhax/dev/originals/dataset-manager-nextjs/node_modules/parquet-wasm/package.json)
kylebarron commented 4 months ago

you should look at the readme for the git tag that you have installed

kylebarron commented 4 months ago

I've tried copying the files directly into my project and it errors:

that's probably because you're missing the underlying rust bundle

matbee-eth commented 4 months ago

I've tried copying the files directly into my project and it errors:

that's probably because you're missing the underlying rust bundle

I'm using WASM in the browser, not rust, I'm very confused.

kylebarron commented 4 months ago

When I say "rust" I mean webassembly.

Cannot read properties of undefined (reading '__wbindgen_add_to_stack_pointer')

usually means either that the Wasm bundle was not loaded or, if you're using the esm entrypoint, that the wasm was not initialized. With the esm entrypoint you need to await the default export.