| 805 | } |
| 806 | |
| 807 | ArrowArray* ArrowRowBatch::convertStructVectorToArray(ArrowVector& vector, const LogicalType& type, |
| 808 | bool fallbackExtensionTypes) { |
| 809 | auto result = createArrayFromVector(vector); |
| 810 | result->n_buffers = 1; |
| 811 | vector.childPointers.resize(StructType::getNumFields(type)); |
| 812 | result->children = vector.childPointers.data(); |
| 813 | result->n_children = (std::int64_t)StructType::getNumFields(type); |
| 814 | for (auto i = 0u; i < StructType::getNumFields(type); i++) { |
| 815 | const auto& childType = StructType::getFieldType(type, i); |
| 816 | vector.childPointers[i] = |
| 817 | convertVectorToArray(*vector.childData[i], childType, fallbackExtensionTypes); |
| 818 | } |
| 819 | vector.array = std::move(result); |
| 820 | return vector.array.get(); |
| 821 | } |
| 822 | |
| 823 | ArrowArray* ArrowRowBatch::convertInternalIDVectorToArray(ArrowVector& vector, |
| 824 | const LogicalType& /*type*/, bool fallbackExtensionTypes) { |
nothing calls this directly
no test coverage detected