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

Method Call

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

Source from the content-addressed store, hash-verified

1847
1848 template <typename OutValue, typename... Ignored>
1849 OutValue Call(KernelContext*, std::string_view val, Status*) const {
1850 OutValue count = 0;
1851 uint64_t start = 0;
1852 const auto pattern_size = std::max<uint64_t>(1, matcher_.options_.pattern.size());
1853 while (start <= val.size()) {
1854 const int64_t index = matcher_.Find(val.substr(start));
1855 if (index >= 0) {
1856 count++;
1857 start += index + pattern_size;
1858 } else {
1859 break;
1860 }
1861 }
1862 return count;
1863 }
1864};
1865
1866#ifdef ARROW_WITH_RE2

Callers

nothing calls this directly

Calls 3

substrMethod · 0.80
sizeMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected