Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error with mismatched Apache Arrow version #1761

Open
willium opened this issue Jun 10, 2024 · 8 comments
Open

Throw an error with mismatched Apache Arrow version #1761

willium opened this issue Jun 10, 2024 · 8 comments

Comments

@willium
Copy link

willium commented Jun 10, 2024

What happens?

Right now, if you have a mismatched apache arrow version, DuckDB WASM fails silently or throws very confusing errors. I was trying to create a table, and nothing happened.

To Reproduce

Target Arrow 15 or 16, and try to use DuckDB.

Browser/Environment:

Chrome

Device:

Mac

DuckDB-Wasm Version:

Latest

DuckDB-Wasm Deployment:

App

Full Name:

William Wolf

Affiliation:

Gestalt

@domoritz
Copy link
Collaborator

This keeps coming up. I wonder what the best way to resolve this is. Maybe only include arrow as a peer dependency or a more robust check for isArrowTable?

@domoritz
Copy link
Collaborator

Related vega/vega-loader-arrow#350

@rob-blackbourn
Copy link

Is the arrow esm vs csj problem I reported here #1708 ?

@domoritz
Copy link
Collaborator

That's related. The problem can also happen when you have e.g. arrow 14 but duckdb wasm uses arrow 15.

@carlopi
Copy link
Collaborator

carlopi commented Jun 10, 2024

Problem seems quite hard, it's the problem of being successful, but instanceof feel like the wrong solution here. Would it not be possible to duck-type this and assume that if something looks like an arrow table has to be an arrow table?

Or possibly using stuff like obj.constructor.someStaticFieldThatEncodesTheArrowVersion ?

@carlopi
Copy link
Collaborator

carlopi commented Jun 10, 2024

One note is that DuckDB-Wasm has possibly a simpler job that regular arrow, since we can implement detection our side, once a semi-reliable detection function is approved.

@stefnotch
Copy link

One option might be to re-export apache arrow? At least that's what some Rust libraries do for their dependencies.

@domoritz
Copy link
Collaborator

That doesn't help if another library has arrow as a dependency. This really needs to be solved at the npm/yarn/etc level but we can try to warn people when they may have multiple versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants