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

Fix decimal empty list bug #1015

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Conversation

billylanchantin
Copy link
Contributor

Fixes two things:

  1. The :decimal generator was generating Elixir-side #Decimal<>s that the Rust-side couldn't represent.
  2. There was a bug in s_from_list_decimal where empty lists failed to have the Decimal(...) dtype.

Now we can remove the decimal-related TODOs we added in #1012.

See also: #1014.

Before we were generating values that the
Rust side couldn't handle.
Sometimes this decode failure happens because
Elixir Decimals can hold a wider range of values
than Rust (Arrow) Decimals. Here, we're giving a
hint about why the decode may have failed.
The bug turned out to be that in the presence of
empty lists, we weren't casting when we should
have been.
After restricting the decimal generator such that
it only produced valid Decimals and fixing the
empty list bug, it now seems like it's safe to
include decimals in the property tests.
@billylanchantin
Copy link
Contributor Author

billylanchantin commented Nov 14, 2024

Also worth noting:

EDIT: contents moved to their own issue: #1016

@billylanchantin billylanchantin merged commit 5608c27 into main Nov 14, 2024
4 checks passed
@billylanchantin billylanchantin deleted the bl-fix-decimal-empty-list-bug branch November 14, 2024 21:32
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

Successfully merging this pull request may close these issues.

2 participants