| 100 | count += result->size(); |
| 101 | } |
| 102 | return count; |
| 103 | } |
| 104 | }; |
| 105 | |
| 106 | TypePtr buildStructType( |
| 107 | std::function<std::string(int)>&& nameGenerator, |
| 108 | const TypePtr& fieldType, |
| 109 | size_t numChildren) { |
| 110 | std::vector<std::string> names; |
| 111 | std::vector<TypePtr> types; |
| 112 | for (int i = 0; i < numChildren; i++) { |
| 113 | names.push_back(nameGenerator(i)); |
| 114 | types.push_back(fieldType); |
| 115 | } |
| 116 | return ROW(std::move(names), std::move(types)); |