emkornfield commented on a change in pull request #10177: URL: https://github.com/apache/arrow/pull/10177#discussion_r689930031
########## File path: cpp/src/arrow/compute/kernels/scalar_set_lookup_test.cc ########## @@ -803,6 +803,24 @@ TEST_F(TestIndexInKernel, FixedSizeBinary) { CheckIndexIn(fixed_size_binary(0), R"([])", R"([])", R"([])"); } +TEST_F(TestIndexInKernel, MonthDayNanoInterval) { + auto type = month_day_nano_interval(); + + CheckIndexIn(type, + /*input=*/R"([[5, -1, 5], null, [4, 5, 6], [5, -1, 5], [1, 2, 3]])", + /*value_set=*/R"([null, [4, 5, 6], [5, -1, 5]])", + /*expected=*/R"([2, 0, 1, 2, null])", + /*skip_nulls=*/false); + + // Duplicates in value_set + CheckIndexIn( + type, + /*input=*/R"([[7, 8, 0], null, [0, 0, 0], [7, 8, 0], [0, 0, 1]])", + /*value_set=*/R"([null, null, [0, 0, 0], [0, 0, 0], [7, 8, 0], [7, 8, 0]])", + /*expected=*/R"([4, 0, 2, 4, null])", + /*skip_nulls=*/false); +} + Review comment: I'm not really sure. I included this, because this seemed like the only code path to test the change for adding a hash for the new type. I might have been able to skip adding some of the code but it wasn't immediately obvious to me how to do that. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org