pitrou commented on code in PR #14505:
URL: https://github.com/apache/arrow/pull/14505#discussion_r1019266032
##########
cpp/src/arrow/compute/kernels/vector_sort_test.cc:
##########
@@ -2182,5 +2185,146 @@ TEST(TestRankForFixedSizeBinary, RankFixedSizeBinary) {
ArrayFromJSON(binary_type, R"(["aaa", " ", "eee", null, "eee", null, "
"])"));
}
+TEST(TestRankForReal, RankRealChunked) {
+ for (auto real_type : ::arrow::FloatingPointTypes()) {
+ for (auto null_placement : AllNullPlacements()) {
+ for (auto tiebreaker : AllTiebreakers()) {
+ for (auto order : AllOrders()) {
+ AssertRankEmpty(real_type, order, null_placement, tiebreaker);
+ }
+
+ AssertRankSimple(
+ ChunkedArrayFromJSON(real_type, {"[2.1, 3.2]", "[1.0, 0.0, 5.5]"}),
+ null_placement, tiebreaker);
+ }
+ }
+ AssertRankAllTiebreakers(
+ ChunkedArrayFromJSON(real_type, {"[1.2, 0.0]", "[5.3, null, 5.3, null,
0.0]"}));
+ }
+}
+
+TEST(TestRankForIntegral, RankIntegralChunked) {
Review Comment:
Can you add some tests for zero chunks and/or empty chunks?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]