You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2023/08/14 12:07:36 UTC
[GitHub] [arrow] pitrou commented on a diff in pull request #37135: GH-37110: [C++] Expression: SmallestTypeFor lost tz for Scalar
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org