Skip to content

Commit

Permalink
Accept GenericNullPartitionResult
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jan 13, 2025
1 parent 2b361b8 commit 72c108d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/src/arrow/compute/kernels/vector_rank.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ constexpr bool NeedsDuplicates(RankOptions::Tiebreaker tiebreaker) {
return tiebreaker != RankOptions::First;
}

template <typename ValueSelector>
void MarkDuplicates(const NullPartitionResult& sorted, ValueSelector&& value_selector) {
using T = decltype(value_selector(int64_t{}));
template <typename IndexType, typename ValueSelector>
void MarkDuplicates(const GenericNullPartitionResult<IndexType>& sorted,
ValueSelector&& value_selector) {
using T = decltype(value_selector(*sorted.non_nulls_begin));

// Process non-nulls
if (sorted.non_nulls_end != sorted.non_nulls_begin) {
Expand Down

0 comments on commit 72c108d

Please sign in to comment.