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

ARROW-5964: [C++][Gandiva] Remove overflow check after rounding in BasicDecimal128::FromDouble #4894

Closed
wants to merge 2 commits into from

Conversation

pravindra
Copy link
Contributor

  • std::round can round down also.
  • also, there is a check further down for overflow (2^127-1).

- std::round can round down also.
- also, there is a check further down for overflow (2^127-1).
@pravindra
Copy link
Contributor Author

@pprudhvi

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

Just one question, otherwise LGTM.
(note: Travis-CI failure is unrelated)

cpp/src/gandiva/precompiled/decimal_ops_test.cc Outdated Show resolved Hide resolved
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

+1. Will need to wait for green CI...

@wesm wesm changed the title ARROW-5964: remove overflow check after rounding ARROW-5964: [C++][Gandiva] Remove overflow check after rounding in BasicDecimal128::FromDouble Jul 17, 2019
@wesm
Copy link
Member

wesm commented Jul 17, 2019

I updated the PR title to add missing context about what this patch is

@codecov-io
Copy link

Codecov Report

Merging #4894 into master will increase coverage by 1.61%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4894      +/-   ##
==========================================
+ Coverage   87.43%   89.05%   +1.61%     
==========================================
  Files         995      718     -277     
  Lines      140466   100330   -40136     
  Branches     1418        0    -1418     
==========================================
- Hits       122821    89351   -33470     
+ Misses      17283    10979    -6304     
+ Partials      362        0     -362
Impacted Files Coverage Δ
cpp/src/gandiva/precompiled/decimal_ops_test.cc 97.43% <ø> (ø) ⬆️
cpp/src/gandiva/precompiled/decimal_ops.cc 97.17% <100%> (ø) ⬆️
cpp/src/plasma/thirdparty/ae/ae.c 70.75% <0%> (-0.95%) ⬇️
r/src/compute.cpp 100% <0%> (ø) ⬆️
go/arrow/ipc/writer.go
js/src/util/fn.ts
go/arrow/memory/memory_avx2_amd64.go
rust/datafusion/src/execution/filter.rs
rust/arrow/src/csv/writer.rs
rust/datafusion/src/bin/main.rs
... and 274 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 a54888a...8d6f37a. Read the comment docs.

@wesm wesm closed this in be876eb Jul 17, 2019
@pravindra
Copy link
Contributor Author

thanks @pitrou and @wesm

pravindra pushed a commit to dremio/arrow that referenced this pull request Jul 18, 2019
…sicDecimal128::FromDouble

- std::round can round down also.
- also, there is a check further down for overflow (2^127-1).

Author: Pindikura Ravindra <ravindra@dremio.com>

Closes apache#4894 from pravindra/arrow-5964 and squashes the following commits:

8d6f37a <Pindikura Ravindra> fix tests
eaee1ab <Pindikura Ravindra> ARROW-5964: remove overflow check after rounding
kszucs pushed a commit that referenced this pull request Jul 22, 2019
…sicDecimal128::FromDouble

- std::round can round down also.
- also, there is a check further down for overflow (2^127-1).

Author: Pindikura Ravindra <ravindra@dremio.com>

Closes #4894 from pravindra/arrow-5964 and squashes the following commits:

8d6f37a <Pindikura Ravindra> fix tests
eaee1ab <Pindikura Ravindra> ARROW-5964: remove overflow check after rounding
pprudhvi pushed a commit to pprudhvi/arrow that referenced this pull request Aug 11, 2019
…sicDecimal128::FromDouble

- std::round can round down also.
- also, there is a check further down for overflow (2^127-1).

Author: Pindikura Ravindra <ravindra@dremio.com>

Closes apache#4894 from pravindra/arrow-5964 and squashes the following commits:

8d6f37a <Pindikura Ravindra> fix tests
eaee1ab <Pindikura Ravindra> ARROW-5964: remove overflow check after rounding
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.

4 participants