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

Method CreateFor

cpp/src/arrow/builder.cc:169–188  ·  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 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

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