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

Method VisitNative

python/pyarrow/src/arrow/python/numpy_to_arrow.cc:275–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273
274 template <typename ArrowType>
275 Status VisitNative() {
276 if (mask_ != nullptr) {
277 RETURN_NOT_OK(InitNullBitmap());
278 null_count_ = MaskToBitmap(mask_, length_, null_bitmap_data_);
279 if (null_count_ == -1) return Status::Invalid("Invalid mask type");
280 } else {
281 RETURN_NOT_OK(NumPyNullsConverter::Convert(pool_, arr_, from_pandas_, &null_bitmap_,
282 &null_count_));
283 }
284
285 std::shared_ptr<Buffer> data;
286 RETURN_NOT_OK(ConvertData<ArrowType>(&data));
287
288 auto arr_data = ArrayData::Make(type_, length_, {null_bitmap_, data}, null_count_, 0);
289 return PushArray(arr_data);
290 }
291
292 template <typename T>
293 Status VisitBinary(T* builder);

Callers

nothing calls this directly

Calls 4

MaskToBitmapFunction · 0.85
InvalidFunction · 0.50
ConvertFunction · 0.50
MakeFunction · 0.50

Tested by

no test coverage detected