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

Method FindFirstInternal

cpp/src/arrow/csv/chunker.cc:286–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284
285 template <bool UseBulkFilter>
286 Status FindFirstInternal(std::string_view partial, std::string_view block,
287 int64_t* out_pos) {
288 const char* line_end = lexer_.template ReadLine<UseBulkFilter>(
289 partial.data(), partial.data() + partial.size());
290 DCHECK_EQ(line_end, nullptr); // Otherwise `partial` is a whole CSV line
291 line_end = lexer_.template ReadLine<UseBulkFilter>(block.data(),
292 block.data() + block.size());
293
294 if (line_end == nullptr) {
295 // No complete CSV line
296 *out_pos = -1;
297 } else {
298 *out_pos = static_cast<int64_t>(line_end - block.data());
299 DCHECK_GT(*out_pos, 0);
300 }
301 return Status::OK();
302 }
303
304 Status FindLast(std::string_view block, int64_t* out_pos) override {
305 lexer_.Reset();

Callers

nothing calls this directly

Calls 3

OKFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected