bkmgit commented on a change in pull request #11882:
URL: https://github.com/apache/arrow/pull/11882#discussion_r787760105



##########
File path: cpp/src/arrow/compute/kernels/scalar_compare_test.cc
##########
@@ -1865,5 +1867,683 @@ TEST(TestMaxElementWiseMinElementWise, CommonTemporal) {
               ResultWith(ScalarFromJSON(date64(), "86400000")));
 }
 
+template <typename ArrowType>
+static void ValidateBetween(BetweenOptions options, const Datum& val, const 
Datum& lhs,
+                            const Datum& rhs, const Datum& expected) {
+  ASSERT_OK_AND_ASSIGN(Datum result, Between(val, lhs, rhs, options, nullptr));
+  AssertArraysEqual(*expected.make_array(), *result.make_array(),
+                    /*verbose=*/true);
+}
+
+template <typename ArrowType>
+void ValidateBetween(BetweenOptions options, const Datum& val, const Datum& 
lhs,
+                     const Datum& rhs) {
+  CompareOperator lhs_val;
+  CompareOperator val_rhs;
+  BetweenOptions::Inclusive include_endpoints = options.inclusive;
+
+  if (include_endpoints == BetweenOptions::Inclusive::NEITHER) {

Review comment:
       Moved option loop here. 




-- 
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]


Reply via email to