pitrou commented on code in PR #37135:
URL: https://github.com/apache/arrow/pull/37135#discussion_r1293376352


##########
cpp/src/arrow/compute/expression_test.cc:
##########
@@ -630,6 +630,12 @@ TEST(Expression, BindWithImplicitCasts) {
                       literal(std::make_shared<TimestampScalar>(0, 
TimeUnit::NANO))),
                   cmp(field_ref("ts_s"),
                       literal(std::make_shared<TimestampScalar>(0, 
TimeUnit::SECOND))));
+    // GH-37110
+    ExpectBindsTo(
+        cmp(field_ref("ts_s"),
+            literal(std::make_shared<TimestampScalar>(0, TimeUnit::NANO, 
"UTC"))),
+        cmp(field_ref("ts_s"),
+            literal(std::make_shared<TimestampScalar>(0, TimeUnit::SECOND, 
"UTC"))));

Review Comment:
   Since we are at it and the original PR didn't add many tests, can we also 
test non-zero values? For example (untested):
   ```suggestion
               literal(std::make_shared<TimestampScalar>(0, TimeUnit::SECOND, 
"UTC"))));
       ExpectBindsTo(
           cmp(field_ref("ts_s"),
               literal(std::make_shared<TimestampScalar>(123000, 
TimeUnit::NANO, "UTC"))),
           cmp(field_ref("ts_s"),
               literal(std::make_shared<TimestampScalar>(123, TimeUnit::MICRO, 
"UTC"))));         
   ```



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