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

Method VisitNative

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

Source from the content-addressed store, hash-verified

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