MCPcopy Create free account
hub / github.com/apache/arrow / CreateFor

Method CreateFor

cpp/src/arrow/builder.cc:169–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

is_integerFunction · 0.70
TypeErrorFunction · 0.70
OKFunction · 0.70
resetMethod · 0.45
idMethod · 0.45
byte_widthMethod · 0.45

Tested by

no test coverage detected