Navigation Menu

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

There is no compiler error when using an invalid Decimal type. #2440

Closed
HaoYang670 opened this issue Aug 14, 2022 · 0 comments · Fixed by #2477
Closed

There is no compiler error when using an invalid Decimal type. #2440

HaoYang670 opened this issue Aug 14, 2022 · 0 comments · Fixed by #2477
Labels
arrow Changes to the arrow crate bug

Comments

@HaoYang670
Copy link
Contributor

Describe the bug
Users can create Decimal values with invalid BYTE_WIDTH, such as

let v = BasicDecimal::<1>::new(1, 1, &[1]);

Expected behavior
We need to add more restriction to the decimal type so that only Decimal128 and Decimal256 can be used.

Additional context

@HaoYang670 HaoYang670 added the bug label Aug 14, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Aug 17, 2022
tustvold added a commit that referenced this issue Aug 18, 2022
* Simplify decimal (#2440)

* Format

* Fix doc

* Review feedback

* Add docs

* Fix logical merge conflict
@alamb alamb added the arrow Changes to the arrow crate label Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants