| 1749 | "should only codegen on physical types"); |
| 1750 | |
| 1751 | static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) { |
| 1752 | const MatchSubstringOptions& options = MatchSubstringState::Get(ctx); |
| 1753 | if (options.ignore_case) { |
| 1754 | #ifdef ARROW_WITH_RE2 |
| 1755 | const bool is_utf8 = is_string_or_string_view(batch[0].type()->id()); |
| 1756 | ARROW_ASSIGN_OR_RAISE(auto matcher, |
| 1757 | FindSubstringRegex::Make(options, is_utf8, true)); |
| 1758 | applicator::ScalarUnaryNotNullStateful<OffsetType, InputPhysicalType, |
| 1759 | FindSubstringRegex> |
| 1760 | kernel{std::move(matcher)}; |
| 1761 | return kernel.Exec(ctx, batch, out); |
| 1762 | #else |
| 1763 | return Status::NotImplemented("ignore_case requires RE2"); |
| 1764 | #endif |
| 1765 | } |
| 1766 | applicator::ScalarUnaryNotNullStateful<OffsetType, InputPhysicalType, FindSubstring> |
| 1767 | kernel{FindSubstring(PlainSubstringMatcher(options))}; |
| 1768 | return kernel.Exec(ctx, batch, out); |
| 1769 | } |
| 1770 | }; |
| 1771 | |
| 1772 | const FunctionDoc find_substring_doc( |
nothing calls this directly
no test coverage detected