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

Method MakeTable

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

Source from the content-addressed store, hash-verified

813 }
814
815 Result<std::shared_ptr<Table>> MakeTable() {
816 DCHECK_EQ(column_builders_.size(), conversion_schema_.columns.size());
817
818 std::vector<std::shared_ptr<Field>> fields;
819 std::vector<std::shared_ptr<ChunkedArray>> columns;
820
821 for (int32_t i = 0; i < static_cast<int32_t>(column_builders_.size()); ++i) {
822 const auto& column = conversion_schema_.columns[i];
823 ARROW_ASSIGN_OR_RAISE(auto array, column_builders_[i]->Finish());
824 fields.push_back(::arrow::field(column.name, array->type()));
825 columns.emplace_back(std::move(array));
826 }
827 return Table::Make(schema(std::move(fields)), std::move(columns));
828 }
829
830 // Column builders for target Table (in ConversionSchema order)
831 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