| 160 | } |
| 161 | |
| 162 | static void resizeUnionVector(ArrowVector* vector, const LogicalType& type, int64_t capacity, |
| 163 | bool fallbackExtensionTypes) { |
| 164 | if (vector->capacity < capacity) { |
| 165 | while (vector->capacity < capacity) { |
| 166 | if (vector->capacity == 0) { |
| 167 | vector->capacity = 1; |
| 168 | } else { |
| 169 | vector->capacity *= 2; |
| 170 | } |
| 171 | } |
| 172 | resizeMainBuffer(vector, type, vector->capacity, fallbackExtensionTypes); |
| 173 | } |
| 174 | resizeUnionOverflow(vector, vector->capacity); |
| 175 | std::vector<LogicalType> childTypes; |
| 176 | for (auto i = 0u; i < UnionType::getNumFields(type); i++) { |
| 177 | childTypes.push_back(UnionType::getFieldType(type, i).copy()); |
| 178 | } |
| 179 | resizeChildVectors(vector, childTypes, vector->capacity, fallbackExtensionTypes); |
| 180 | } |
| 181 | |
| 182 | static void resizeInternalIDVector(ArrowVector* vector, const LogicalType& type, int64_t capacity, |
| 183 | bool fallbackExtensionTypes) { |
no test coverage detected