| 742 | namespace { |
| 743 | |
| 744 | void AccumulateLayouts(const std::shared_ptr<DataType>& type, |
| 745 | std::vector<DataTypeLayout>* layouts) { |
| 746 | layouts->push_back(type->layout()); |
| 747 | const DataType* type_for_children = type.get(); |
| 748 | if (type->id() == Type::EXTENSION) { |
| 749 | const auto& ext_type = checked_cast<const ExtensionType&>(*type); |
| 750 | type_for_children = ext_type.storage_type().get(); |
| 751 | } |
| 752 | for (const auto& child : type_for_children->fields()) { |
| 753 | AccumulateLayouts(child->type(), layouts); |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | void AccumulateArrayData(const std::shared_ptr<ArrayData>& data, |
| 758 | std::vector<std::shared_ptr<ArrayData>>* out) { |
no test coverage detected