edponce commented on a change in pull request #11793:
URL: https://github.com/apache/arrow/pull/11793#discussion_r759853682
##########
File path: cpp/src/arrow/compute/kernels/scalar_compare.cc
##########
@@ -439,6 +470,338 @@ struct ScalarMinMax {
}
};
+template <typename Type, typename Op>
+struct BinaryScalarMinMax {
+ using ArrayType = typename TypeTraits<Type>::ArrayType;
+ using BuilderType = typename TypeTraits<Type>::BuilderType;
+ using offset_type = typename Type::offset_type;
+
+ static Status Exec(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
+ const ElementWiseAggregateOptions& options = MinMaxState::Get(ctx);
+ if (std::all_of(batch.values.begin(), batch.values.end(),
Review comment:
Include `<algorithm>` header for `std::all_of`, and `<vector>`.
##########
File path: cpp/src/arrow/compute/kernels/scalar_compare.cc
##########
@@ -78,6 +79,16 @@ struct Minimum {
return std::min(left, right);
}
+ template <typename T, typename Arg0, typename Arg1>
+ static enable_if_decimal_value<T> Call(Arg0 left, Arg1 right) {
+ static_assert(std::is_same<T, Arg0>::value && std::is_same<Arg0,
Arg1>::value, "");
+ return std::min(left, right);
+ }
+
+ static string_view CallBinary(string_view left, string_view right) {
Review comment:
Why is this not `Call`?
--
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]