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

Method Convert

cpp/src/arrow/csv/converter.cc:533–548  ·  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) -> Status {
538 if (ARROW_PREDICT_TRUE(decoder_.IsNull(data, size, quoted))) {
539 return builder.AppendNull();
540 } else {
541 return GenericConversionError(type_, data, size);
542 }
543 };
544 RETURN_NOT_OK(parser.VisitColumn(col_index, visit));
545 std::shared_ptr<Array> res;
546 RETURN_NOT_OK(builder.Finish(&res));
547 return res;
548 }
549
550 protected:
551 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