| 167 | |
| 168 | template <typename ValueType> |
| 169 | Status CreateFor() { |
| 170 | using AdaptiveBuilderType = DictionaryBuilder<ValueType>; |
| 171 | using ExactBuilderType = |
| 172 | internal::DictionaryBuilderBase<TypeErasedIntBuilder, ValueType>; |
| 173 | if (dictionary != nullptr) { |
| 174 | out->reset( |
| 175 | new AdaptiveBuilderType(dictionary, pool, kDefaultBufferAlignment, ordered)); |
| 176 | } else if (exact_index_type) { |
| 177 | if (!is_integer(index_type->id())) { |
| 178 | return Status::TypeError("MakeBuilder: invalid index type ", *index_type); |
| 179 | } |
| 180 | out->reset(new ExactBuilderType(index_type, value_type, pool, |
| 181 | kDefaultBufferAlignment, ordered)); |
| 182 | } else { |
| 183 | auto start_int_size = index_type->byte_width(); |
| 184 | out->reset(new AdaptiveBuilderType(start_int_size, value_type, pool, |
| 185 | kDefaultBufferAlignment, ordered)); |
| 186 | } |
| 187 | return Status::OK(); |
| 188 | } |
| 189 | |
| 190 | Status Make() { return VisitTypeInline(*value_type, this); } |
| 191 |
nothing calls this directly
no test coverage detected