arashandishgar commented on code in PR #45577:
URL: https://github.com/apache/arrow/pull/45577#discussion_r1969083468
##########
cpp/src/arrow/compute/kernels/scalar_string_test.cc:
##########
@@ -1958,6 +1960,29 @@ TYPED_TEST(TestBaseBinaryKernels, ExtractRegex) {
R"([{"letter": "a", "digit": "1"}, {"letter": "b", "digit":
"3"}])",
&options);
}
+TYPED_TEST(TestBaseBinaryKernels, ExtractRegexSapn) {
+ ExtractRegexSpanOptions options{"(?P<letter>[ab])(?P<digit>\\d)"};
+ auto type_fixe_size_list = is_binary_like(this->type()->id()) ? int32() :
int64();
+ auto out_type = struct_({field("letter_span",
fixed_size_list(type_fixe_size_list, 2)),
+ field("digit_span",
fixed_size_list(type_fixe_size_list, 2))});
+ this->CheckUnary("extract_regex_span", R"([])", out_type, R"([])", &options);
+ this->CheckUnary(
+ "extract_regex_span", R"(["a1", "b2", "c3", null])", out_type,
Review Comment:
> Can your example showcase an optional capture, and also failed matches to
make sure that nulls are appropriately set in those sityations?
c3 and null is the case in which match failed is happend
--
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]