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

Method MakeTable

cpp/src/arrow/csv/reader.cc:809–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807 }
808
809 Result<std::shared_ptr<Table>> MakeTable() {
810 DCHECK_EQ(column_builders_.size(), conversion_schema_.columns.size());
811
812 std::vector<std::shared_ptr<Field>> fields;
813 std::vector<std::shared_ptr<ChunkedArray>> columns;
814
815 for (int32_t i = 0; i < static_cast<int32_t>(column_builders_.size()); ++i) {
816 const auto& column = conversion_schema_.columns[i];
817 ARROW_ASSIGN_OR_RAISE(auto array, column_builders_[i]->Finish());
818 fields.push_back(::arrow::field(column.name, array->type()));
819 columns.emplace_back(std::move(array));
820 }
821 return Table::Make(schema(std::move(fields)), std::move(columns));
822 }
823
824 // Column builders for target Table (in ConversionSchema order)
825 std::vector<std::shared_ptr<ColumnBuilder>> column_builders_;

Callers 1

ReadAsyncMethod · 0.80

Calls 7

push_backMethod · 0.80
emplace_backMethod · 0.80
fieldFunction · 0.50
MakeFunction · 0.50
schemaFunction · 0.50
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected