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

Compressing a sparsely populated column results in a divide by 0 panic #21

Open
charlie-collard opened this issue Oct 13, 2022 · 0 comments

Comments

@charlie-collard
Copy link

charlie-collard commented Oct 13, 2022

Of course it's pretty silly to even attempt this, but I was attempting to compress every column in a table, one of which happened to be very sparse, and got this error:

[2022-10-13T16:28:08Z INFO  sqlite_zstd::transparent] prediction_messages.eventEndedByType: Total 248696 rows (69.04kB) to potentially compress (split in 5 groups).
[2022-10-13T16:28:08Z DEBUG sqlite_zstd::transparent] looking at group=c.14371185, has 71626 rows with 0B average size (16.42kB total)
[2022-10-13T16:28:08Z DEBUG sqlite_zstd::transparent] Found existing dictionary id=1 for key=c.14371185
thread '<unnamed>' panicked at 'attempt to divide by zero', src/transparent.rs:804:26

16.42kB across 71626 rows is an average of 0.2 bytes per row, which seems to be getting rounded to 0.

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

1 participant