bkietz commented on a change in pull request #11937:
URL: https://github.com/apache/arrow/pull/11937#discussion_r768106150
##########
File path: cpp/src/arrow/compute/api_vector.h
##########
@@ -188,6 +188,29 @@ class ARROW_EXPORT PartitionNthOptions : public
FunctionOptions {
NullPlacement null_placement;
};
+/// \brief Options for IsMonotonic
+class ARROW_EXPORT IsMonotonicOptions : public FunctionOptions {
+ public:
+ enum NullHandling {
+ // Ignore nulls.
Review comment:
Please use /// to allow doxygen to detect docstrings
```suggestion
/// Ignore nulls.
```
##########
File path: cpp/src/arrow/compute/api_vector.h
##########
@@ -188,6 +188,29 @@ class ARROW_EXPORT PartitionNthOptions : public
FunctionOptions {
NullPlacement null_placement;
};
+/// \brief Options for IsMonotonic
+class ARROW_EXPORT IsMonotonicOptions : public FunctionOptions {
+ public:
+ enum NullHandling {
+ // Ignore nulls.
+ IGNORE,
+ // Use min value of element type as the value of nulls.
+ MIN,
+ // Use max value of element type as the value of nulls.
+ MAX,
+ };
+
+ explicit IsMonotonicOptions(NullHandling null_handling = IGNORE,
+ EqualOptions equal_options =
EqualOptions::Defaults());
+ constexpr static char const kTypeName[] = "IsMonotonicOptions";
+ static IsMonotonicOptions Defaults() { return IsMonotonicOptions(); }
+
+ // Define how nulls are handled.
+ NullHandling null_handling;
+ // Options for equality comparisons. Used for floats.
+ EqualOptions equal_options;
Review comment:
Instead of reusing this here, please add a separate enumeration for nan
handling (`nans_equal` seems to be the only field you're using here).
`is_monotonic_to_within_tolerance` sounds like a separate (floating-point-only)
function.
(Adding to the confusion here is: based on naming, `EqualOptions` looks like
a subclass of `FunctionOptions` but isn't)
--
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]