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

Method Convert

cpp/src/arrow/csv/converter.cc:533–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531 decoder_(type_, options_, static_cast<const TrieCache*>(trie_cache_.get())) {}
532
533 Result<std::shared_ptr<Array>> Convert(const BlockParser& parser,
534 int32_t col_index) override {
535 NullBuilder builder(pool_);
536
537 auto visit = [&](const uint8_t* data, uint32_t size, bool quoted,
538 bool missing) -> Status {
539 if (missing || ARROW_PREDICT_TRUE(decoder_.IsNull(data, size, quoted))) {
540 return builder.AppendNull();
541 } else {
542 return GenericConversionError(type_, data, size);
543 }
544 };
545 RETURN_NOT_OK(parser.VisitColumn(col_index, visit));
546 std::shared_ptr<Array> res;
547 RETURN_NOT_OK(builder.Finish(&res));
548 return res;
549 }
550
551 protected:
552 Status Initialize() override { return decoder_.Initialize(); }

Callers 11

DecodeMethod · 0.45
RunInferenceMethod · 0.45
BenchmarkConversionFunction · 0.45
DecodeMethod · 0.45
DecodeMethod · 0.45
InsertMethod · 0.45
TryConvertChunkMethod · 0.45
AssertConversionFunction · 0.45
DictConversionFunction · 0.45
AssertConversionErrorFunction · 0.45
TESTFunction · 0.45

Calls 4

GenericConversionErrorFunction · 0.70
IsNullMethod · 0.45
AppendNullMethod · 0.45
FinishMethod · 0.45

Tested by 4

AssertConversionFunction · 0.36
DictConversionFunction · 0.36
AssertConversionErrorFunction · 0.36
TESTFunction · 0.36