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

Method Convert

cpp/src/arrow/json/converter.cc:210–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 : PrimitiveConverter(pool, type), converter_(pool, repr_type()) {}
209
210 Status Convert(const std::shared_ptr<Array>& in, std::shared_ptr<Array>* out) override {
211 if (in->type_id() == Type::NA) {
212 return MakeArrayOfNull(out_type_, in->length(), pool_).Value(out);
213 }
214
215 std::shared_ptr<Array> repr;
216 RETURN_NOT_OK(converter_.Convert(in, &repr));
217
218 auto out_data = repr->data()->Copy();
219 out_data->type = out_type_;
220 *out = MakeArray(out_data);
221
222 return Status::OK();
223 }
224
225 private:
226 using ReprType = typename CTypeTraits<typename DateTimeType::c_type>::ArrowType;

Callers

nothing calls this directly

Calls 9

MakeArrayOfNullFunction · 0.85
OKFunction · 0.70
MakeArrayFunction · 0.50
type_idMethod · 0.45
ValueMethod · 0.45
lengthMethod · 0.45
ConvertMethod · 0.45
CopyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected