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

Pass generate_decimal256_case integration test, add DataType::Decimal256 #2094

Merged
merged 1 commit into from Jul 21, 2022

Conversation

viirya
Copy link
Member

@viirya viirya commented Jul 18, 2022

Which issue does this PR close?

Closes #2093.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added arrow Changes to the arrow crate parquet Changes to the parquet crate labels Jul 18, 2022
@viirya viirya force-pushed the decimal256_interop branch 2 times, most recently from 884e717 to bd591f3 Compare July 18, 2022 03:33
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2022

Codecov Report

Merging #2094 (9b005d3) into master (efd3152) will decrease coverage by 0.04%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #2094      +/-   ##
==========================================
- Coverage   83.73%   83.68%   -0.05%     
==========================================
  Files         225      225              
  Lines       59412    59461      +49     
==========================================
+ Hits        49748    49760      +12     
- Misses       9664     9701      +37     
Impacted Files Coverage Δ
arrow/src/array/equal/decimal.rs 96.29% <0.00%> (-3.71%) ⬇️
arrow/src/array/transform/fixed_binary.rs 68.18% <0.00%> (-6.82%) ⬇️
arrow/src/datatypes/field.rs 54.45% <0.00%> (-0.14%) ⬇️
arrow/src/ipc/reader.rs 90.82% <ø> (ø)
integration-testing/src/lib.rs 0.00% <0.00%> (ø)
parquet/src/arrow/arrow_writer/mod.rs 97.53% <ø> (ø)
arrow/src/ipc/convert.rs 93.71% <23.07%> (-1.87%) ⬇️
arrow/src/array/data.rs 84.88% <33.33%> (-0.07%) ⬇️
arrow/src/datatypes/datatype.rs 62.88% <33.33%> (-1.53%) ⬇️
arrow/src/array/equal/mod.rs 96.34% <50.00%> (-0.14%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efd3152...9b005d3. Read the comment docs.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

This is very cool @viirya

I wonder if anyone else has thoughts about how to name the new DataType?

@@ -195,6 +195,8 @@ pub enum DataType {
///
/// For example the number 123.45 has precision 5 and scale 2.
Decimal(usize, usize),
/// Exact decimal value with 256 bits width
Decimal256(usize, usize),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also rename Decimal to Decimal128?

Or maybe use an extra mode in Decimal like `

enum BitWidth {
  // 128 bits
  Bits128,
  // 256 bits
  Bits256,
}


enum DataType {
..
  Decimal(usize, usize, DecimalWidth)
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought to add a parameter to current Decimal like you put above. But soon I realize that I need to modify many places. And we need to do bit width check there. As in C++ and Python implementations, they have Decimal128Type and Decimal256Type separately. I feel that it is simple to work with.

And, yea, we need to rename Decimal to Decimal128. Although I've not done it in this change as this is basically for Decimal256 interop test. I may work on it in another PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

And, yea, we need to rename Decimal to Decimal128.

I agree

I may work on it in another PR.

Thank you!

@alamb
Copy link
Contributor

alamb commented Jul 21, 2022

I see #2101 as well so 👍

@alamb alamb changed the title Pass generate_decimal256_case integration test Pass generate_decimal256_case integration test, add DataType::Decimal256 Jul 21, 2022
@alamb alamb merged commit fd38664 into apache:master Jul 21, 2022
@ursabot
Copy link

ursabot commented Jul 21, 2022

Benchmark runs are scheduled for baseline = 576069a and contender = fd38664. fd38664 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 parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass generate_decimal256_case arrow integration test
4 participants