MCPcopy Create free account
hub / github.com/apache/arrow / Exec

Method Exec

cpp/src/arrow/compute/kernels/scalar_string_ascii.cc:1751–1769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
1772const FunctionDoc find_substring_doc(

Callers

nothing calls this directly

Calls 8

is_string_or_string_viewFunction · 0.85
FindSubstringClass · 0.85
GetFunction · 0.50
NotImplementedFunction · 0.50
idMethod · 0.45
typeMethod · 0.45
ExecMethod · 0.45

Tested by

no test coverage detected