| 1559 | } |
| 1560 | |
| 1561 | Result<std::shared_ptr<RecordBatch>> MakeRecordBatch(std::shared_ptr<Schema> schema) { |
| 1562 | DCHECK_NE(data_, nullptr); |
| 1563 | if (data_->GetNullCount() != 0) { |
| 1564 | return Status::Invalid( |
| 1565 | "ArrowArray struct has non-zero null count, " |
| 1566 | "cannot be imported as RecordBatch"); |
| 1567 | } |
| 1568 | if (data_->offset != 0) { |
| 1569 | return Status::Invalid( |
| 1570 | "ArrowArray struct has non-zero offset, " |
| 1571 | "cannot be imported as RecordBatch"); |
| 1572 | } |
| 1573 | return RecordBatch::Make(std::move(schema), data_->length, |
| 1574 | std::move(data_->child_data), import_->device_type_, |
| 1575 | import_->device_sync_); |
| 1576 | } |
| 1577 | |
| 1578 | Status ImportChild(const ArrayImporter* parent, struct ArrowArray* src) { |
| 1579 | if (ArrowArrayIsReleased(src)) { |
no test coverage detected