You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "js8544 (via GitHub)" <gi...@apache.org> on 2023/06/22 12:36:18 UTC
[GitHub] [arrow] js8544 commented on a diff in pull request #36058: GH-36047: [C++][Compute] Add support for duration types to IndexIn and IsIn
js8544 commented on code in PR #36058:
URL: https://github.com/apache/arrow/pull/36058#discussion_r1238466388
##########
cpp/src/arrow/compute/kernels/scalar_set_lookup_test.cc:
##########
@@ -238,6 +239,29 @@ TEST_F(TestIsInKernel, TimeTimestamp) {
"[true, false, true]");
}
+TEST_F(TestIsInKernel, TimeDuration) {
+ for (const auto& type : DurationTypes()) {
+ CheckIsIn(type, "[1, null, 5, 1, 2]", "[2, 1, null]",
+ "[true, true, false, true, true]", /*skip_nulls=*/false);
+ CheckIsIn(type, "[1, null, 5, 1, 2]", "[2, 1, null]",
+ "[true, false, false, true, true]", /*skip_nulls=*/true);
+
+ // Duplicates in right array
+ CheckIsIn(type, "[1, null, 5, 1, 2]", "[2, 1, 1, null, 2]",
+ "[true, true, false, true, true]", /*skip_nulls=*/false);
+ CheckIsIn(type, "[1, null, 5, 1, 2]", "[2, 1, 1, null, 2]",
+ "[true, false, false, true, true]", /*skip_nulls=*/true);
+ }
+
+ // Different units, invalid cast
Review Comment:
#36204 will solve this.
--
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