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-5844: [Java] Support comparison & sort for more numeric types #4799

Closed
wants to merge 6 commits into from

Conversation

liyafan82
Copy link
Contributor

Currently, we only support comparison & sort for 32-bit integers, in this issue, we provide support for more numeric data types:

byte
short
long
float
double

@codecov-io
Copy link

codecov-io commented Jul 5, 2019

Codecov Report

Merging #4799 into master will increase coverage by 2.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4799      +/-   ##
==========================================
+ Coverage   87.44%   89.59%   +2.15%     
==========================================
  Files         997      662     -335     
  Lines      139728    96351   -43377     
  Branches     1418        0    -1418     
==========================================
- Hits       122181    86327   -35854     
+ Misses      17185    10024    -7161     
+ Partials      362        0     -362
Impacted Files Coverage Δ
cpp/src/plasma/thirdparty/ae/ae.c 70.75% <0%> (-1.89%) ⬇️
cpp/src/arrow/csv/column-builder.cc 95.29% <0%> (-1.77%) ⬇️
cpp/src/arrow/io/readahead.cc 95.91% <0%> (-1.03%) ⬇️
cpp/src/arrow/util/thread-pool-test.cc 97.66% <0%> (-0.94%) ⬇️
cpp/src/plasma/store.cc 91.13% <0%> (-0.33%) ⬇️
r/src/recordbatch.cpp
r/R/Table.R
js/src/util/fn.ts
go/arrow/array/bufferbuilder.go
r/src/symbols.cpp
... and 330 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 c2c9e99...30f946b. Read the comment docs.

}
}

float result = Math.signum(value1 - value2);
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems like you should either directly return the casted signum or use the if statement, not both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Thanks a lot.

@emkornfield
Copy link
Contributor

+1, LGTM.

kszucs pushed a commit that referenced this pull request Jul 22, 2019
Currently, we only support comparison & sort for 32-bit integers, in this issue, we provide support for more numeric data types:

byte
short
long
float
double

Author: liyafan82 <[email protected]>

Closes #4799 from liyafan82/fly_0704_cmp and squashes the following commits:

a921cdd <liyafan82>  Remove if conditons in default float & double comparators
a4b4099 <liyafan82>  Replace if condition with signum function
30f946b <liyafan82> Merge branch 'master' into fly_0704_cmp
bc880f1 <liyafan82> Merge branch 'master' into fly_0704_cmp
7cbe556 <liyafan82>  Support NaN for float and double
3860c11 <liyafan82>  Support comparison & sort for more numeric types
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.

3 participants