[[arrow::export]]
| 305 | |
| 306 | // [[arrow::export]] |
| 307 | std::shared_ptr<arrow::Table> Table__from_schema( |
| 308 | const std::shared_ptr<arrow::Schema>& schema) { |
| 309 | int64_t num_fields = schema->num_fields(); |
| 310 | |
| 311 | std::vector<std::shared_ptr<arrow::ChunkedArray>> columns(num_fields); |
| 312 | for (int i = 0; i < num_fields; i++) { |
| 313 | auto maybe_column = arrow::ChunkedArray::Make({}, schema->field(i)->type()); |
| 314 | columns[i] = ValueOrStop(maybe_column); |
| 315 | } |
| 316 | |
| 317 | return (arrow::Table::Make(schema, std::move(columns))); |
| 318 | } |
| 319 | |
| 320 | // [[arrow::export]] |
| 321 | r_vec_size Table__ReferencedBufferSize(const std::shared_ptr<arrow::Table>& table) { |
no test coverage detected