lidavidm commented on a change in pull request #11882:
URL: https://github.com/apache/arrow/pull/11882#discussion_r775548721
##########
File path: cpp/src/arrow/compute/api_scalar.h
##########
@@ -316,6 +316,19 @@ struct ARROW_EXPORT CompareOptions {
enum CompareOperator op;
};
+enum BetweenOperator : int8_t {
+ BETWEEN_LESS_EQUAL_LESS_EQUAL,
+ BETWEEN_LESS_EQUAL_LESS_THAN,
+ BETWEEN_LESS_THAN_LESS_EQUAL,
+ BETWEEN_LESS_THAN_LESS_THAN,
+};
+
+struct ARROW_EXPORT BetweenOptions {
+ explicit BetweenOptions(BetweenOperator op) : op(op) {}
+ BetweenOptions() :
BetweenOptions(BetweenOperator::BETWEEN_LESS_EQUAL_LESS_EQUAL) {}
+ enum BetweenOperator op;
Review comment:
Either use enum class, or do this:
```
class BetweenOptions {
enum BetweenOperator {...};
};
```
That way the variants can be accessed as `BetweenOptions::LESS_LESS`.
However, we shouldn't use a plain enum at the top level since the enum values
won't be namespaced.
--
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]