Skip to content

Commit

Permalink
Define VisitFilterOutputFragments explicitly
Browse files Browse the repository at this point in the history
This doesn't affect binary size at all, but documents better what is
expected of this visitor function.
  • Loading branch information
felipecrv committed May 12, 2023
1 parent 9f1f1b9 commit 3c6bef5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cpp/src/arrow/compute/kernels/vector_run_end_selection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,18 @@ Status VisitREExREEFilterOutputFragments(

using EmitRun = std::function<void(int64_t, int64_t, bool)>;

using VisitFilterOutputFragments = Status (*)(MemoryPool*, const ArraySpan&,
const ArraySpan&,
FilterOptions::NullSelectionBehavior,
const EmitFragment&);

/// \param emit_run A callable that takes (run_value_i, run_length, valid).
/// emit_run can be called with run_length=0, but is assumed to be a no-op in that
/// case. run_value_i and valid are undefined if run_length=0. If valid=false,
/// run_value_i should not be used as nulls can be emitted from the filter when
/// null_selection=EMIT_NULL. In that case, run_value_i wouldn't necessarily
/// point to a NULL value in the values array.
template <typename ValuesRunEndType, typename ValuesValueType,
typename VisitFilterOutputFragments>
template <typename ValuesRunEndType, typename ValuesValueType>
Status VisitREExAnyFilterCombinedOutputRuns(
MemoryPool* pool, const ArraySpan& values, const ArraySpan& filter,
FilterOptions::NullSelectionBehavior null_selection,
Expand Down

0 comments on commit 3c6bef5

Please sign in to comment.