-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-5920: [Java] Support sort & compare for all variable width vectors #4860
Conversation
if (vector instanceof TinyIntVector) { | ||
return (VectorValueComparator<T>) new ByteComparator(); | ||
} else if (vector instanceof SmallIntVector) { | ||
return (VectorValueComparator<T>) new ShortComparator(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the casts needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It seems the Java compiler cannot infer the generic type based on the instance of operator.
Codecov Report
@@ Coverage Diff @@
## master #4860 +/- ##
==========================================
+ Coverage 87.42% 89.8% +2.38%
==========================================
Files 994 661 -333
Lines 140102 100936 -39166
Branches 1418 0 -1418
==========================================
- Hits 122481 90646 -31835
+ Misses 17259 10290 -6969
+ Partials 362 0 -362
Continue to review full report at Codecov.
|
+1 |
All types of variable-width vectors can reuse the same comparator for sorting & searching. Author: liyafan82 <[email protected]> Closes #4860 from liyafan82/fly_0712_varsort and squashes the following commits: cbd8c3f <liyafan82> Provide a utility to create the default comparator 46d2c11 <liyafan82> Support sort & compare for all variable width vectors
All types of variable-width vectors can reuse the same comparator for sorting & searching. Author: liyafan82 <[email protected]> Closes apache#4860 from liyafan82/fly_0712_varsort and squashes the following commits: cbd8c3f <liyafan82> Provide a utility to create the default comparator 46d2c11 <liyafan82> Support sort & compare for all variable width vectors
All types of variable-width vectors can reuse the same comparator for sorting & searching.