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

Error: INTERNAL Error: Unsupported compression function type #1781

Open
xelephas opened this issue Jun 29, 2024 · 5 comments
Open

Error: INTERNAL Error: Unsupported compression function type #1781

xelephas opened this issue Jun 29, 2024 · 5 comments

Comments

@xelephas
Copy link

What happens?

I am getting this error when running a simple select query on a user uploaded duckdb database file:

Error: INTERNAL Error: Unsupported compression function type
    at pa.runQuery (duckdb-browser-eh.worker.js:1:741917)
    at Lo.onMessage (duckdb-browser-eh.worker.js:1:729928)
    at Bc.globalThis.onmessage (duckdb-browser-eh.worker.js:1:763450)
@duckdb_duckdb-wasm.js?v=597ea27d:11971 Uncaught (in promise) Error: INTERNAL Error: Unsupported compression function type
    at O.onMessage (@duckdb_duckdb-wasm.js?v=597ea27d:11971:15)

To Reproduce

 await db.registerFileHandle(
            "data_file.duckdb",
            file, // user uploaded file
            2,
            true
        );

const conn = await db.connect();
await conn.query("ATTACH 'data_file.duckdb'")
const arrowResult = await conn.query('select * from data_file.AAPL')

Browser/Environment:

Chrome, Version 126.0.6478.127 (Official Build) (arm64)

Device:

MacOS

DuckDB-Wasm Version:

1.28.1-dev106.0

DuckDB-Wasm Deployment:

Local development

Full Name:

William Walker

Affiliation:

Individual

@elsbrock
Copy link

elsbrock commented Jul 9, 2024

Experiencing the same, but loading the file via ATTACH 'https://.... File can be opened just fine via duckdb CLI.

Edit: figured it out; anything other than uncompressed or none is not supported; you can force the format with PRAGMA force_compression. I tried rle, dictionary, pfor, bitpacking and fsst (not sure if there's more).

@carlopi
Copy link
Collaborator

carlopi commented Aug 23, 2024

I think this is not expected, could either of you possibly share a DB file that demonstrates this problem?

@elsbrock
Copy link

I think it depends on the bundle that was used. I changed it to the Vite approach, and I haven't seen those errors anymore.

@xelephas
Copy link
Author

Thank you @carlopi for looking into this.

Here is the sample file:

https://file.io/PNwQR8qqgict

@marian-andre
Copy link

marian-andre commented Sep 10, 2024

Hello ! I got the same behavior and the same error.
Unfortunately, I cannot share the .duckdb file
One hint from my side: if we use force_compression=uncompressed, no issue anymore. But it's not convenient for me as the file size is huge

EDIT: Installing the module from npm installs the version 1.28.1-dev106.0, with which I get the issue.
By forcing a newer version, for example 1.28.1-dev258.0, I don't get the issue at all.

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

No branches or pull requests

4 participants