liyafan82 commented on a change in pull request #9736:
URL: https://github.com/apache/arrow/pull/9736#discussion_r597544009
##########
File path:
java/algorithm/src/test/java/org/apache/arrow/algorithm/search/TestParallelSearcher.java
##########
@@ -63,16 +95,19 @@ public void testParallelIntSearch() throws
ExecutionException, InterruptedExcept
targetVector.allocateNew(VECTOR_LENGTH);
keyVector.allocateNew(VECTOR_LENGTH);
+ VectorValueComparator<IntVector> comparator = comparatorType ==
ComparatorType.EqualityComparator ? null
+ : DefaultVectorComparators.createDefaultComparator(targetVector);
Review comment:
@emkornfield Comments added. Thanks for your feedback. More comments are
added to the API Java doc.
Please let me give some background here. We have two ways to compare
elements in vectors:
1. Equality semantics: based on `RangeEqualsVisitor`. For an element-wise
comparison, we have two possible results: equal/non-equal.
2. Ordering semantics: based on `ValueVectorComparator`. For an element-wise
comparison, we have three possible results: less than, equal to, and greater
than.
Previously, we supported the equal semantics in this class, now we add
support for the ordering semantics.
We basically reuse the original test cases, but transform it to a
parameterized test class, so the new algorithm can be tested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]