Skip to content

Add validation for Decimal256#2113

Merged
viirya merged 5 commits into
apache:masterfrom
viirya:validation_decimal256
Jul 22, 2022
Merged

Add validation for Decimal256#2113
viirya merged 5 commits into
apache:masterfrom
viirya:validation_decimal256

Conversation

@viirya

@viirya viirya commented Jul 20, 2022

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #2112.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jul 20, 2022
@codecov-commenter

codecov-commenter commented Jul 20, 2022

Copy link
Copy Markdown

Codecov Report

Merging #2113 (b060eb2) into master (db91031) will decrease coverage by 0.00%.
The diff coverage is 80.64%.

@@            Coverage Diff             @@
##           master    #2113      +/-   ##
==========================================
- Coverage   83.71%   83.70%   -0.01%     
==========================================
  Files         225      225              
  Lines       59563    59625      +62     
==========================================
+ Hits        49862    49911      +49     
- Misses       9701     9714      +13     
Impacted Files Coverage Δ
arrow/src/array/array_decimal.rs 91.03% <ø> (ø)
arrow/src/datatypes/datatype.rs 62.69% <60.71%> (-0.54%) ⬇️
arrow/src/array/data.rs 84.90% <88.88%> (+0.02%) ⬆️
arrow/src/array/builder/decimal_builder.rs 86.13% <100.00%> (+3.09%) ⬆️
parquet_derive/src/parquet_field.rs 65.98% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@viirya viirya force-pushed the validation_decimal256 branch from c36f2df to 21e8457 Compare July 20, 2022 19:21
];

/// `MAX_DECIMAL_FOR_LARGER_PRECISION[p]` holds the maximum integer value
/// that can be stored in [DataType::Decimal256] value of precision `p` > 38

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on #2093 which adds DataType::Decimal256

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this causes doc failure in CI.

@alamb alamb Jul 21, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the liberty of merging the latest apache/master into this PR

Comment thread arrow/src/array/data.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still a TODO for this PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was waiting for #2093 where added Decimal256 type, so I can call validate_decimal256_precision here. Let me update this.

@viirya viirya force-pushed the validation_decimal256 branch from 11b2958 to a9bf22a Compare July 21, 2022 19:37
Comment thread arrow/src/array/array_decimal.rs Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix typo

Comment thread integration-testing/src/lib.rs Outdated
Comment on lines 643 to 646

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this was not caught in CI previously.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was a logical conflict: #2121

@viirya viirya force-pushed the validation_decimal256 branch from a9bf22a to 6dfd0b0 Compare July 21, 2022 20:35
@viirya viirya merged commit 34f58f9 into apache:master Jul 22, 2022
@viirya

viirya commented Jul 22, 2022

Copy link
Copy Markdown
Member Author

Thanks @alamb

@ursabot

ursabot commented Jul 22, 2022

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = c3e019f and contender = 34f58f9. 34f58f9 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do value validation for Decimal256

4 participants