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

Method Exec

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

Source from the content-addressed store, hash-verified

1336 using offset_type = typename Type::offset_type;
1337
1338 static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out,
1339 const Matcher* matcher) {
1340 StringBoolTransform<Type>(
1341 ctx, batch,
1342 [&matcher](const void* raw_offsets, const uint8_t* data, int64_t length,
1343 int64_t output_offset, uint8_t* output) {
1344 const offset_type* offsets = reinterpret_cast<const offset_type*>(raw_offsets);
1345 FirstTimeBitmapWriter bitmap_writer(output, output_offset, length);
1346 for (int64_t i = 0; i < length; ++i) {
1347 const char* current_data = reinterpret_cast<const char*>(data + offsets[i]);
1348 int64_t current_length = offsets[i + 1] - offsets[i];
1349 if (matcher->Match(std::string_view(current_data, current_length))) {
1350 bitmap_writer.Set();
1351 }
1352 bitmap_writer.Next();
1353 }
1354 bitmap_writer.Finish();
1355 },
1356 out);
1357 return Status::OK();
1358 }
1359};
1360
1361template <typename Type, typename Matcher>

Callers

nothing calls this directly

Calls 5

OKFunction · 0.50
MatchMethod · 0.45
SetMethod · 0.45
NextMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected