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

Function WriteArrayV1

cpp/src/arrow/ipc/feather.cc:622–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620};
621
622Status WriteArrayV1(const Array& values, io::OutputStream* dst, ArrayMetadata* meta) {
623 std::shared_ptr<Array> sanitized;
624 if (values.type_id() == Type::NA) {
625 // As long as R doesn't support NA, we write this as a StringColumn
626 // to ensure stable roundtrips.
627 sanitized = std::make_shared<StringArray>(values.length(), nullptr, nullptr,
628 values.null_bitmap(), values.null_count());
629 } else {
630 sanitized = MakeArray(values.data());
631 }
632 ArrayWriterV1 visitor{*sanitized, dst, meta};
633 return visitor.Write();
634}
635
636Status WriteColumnV1(const ChunkedArray& values, io::OutputStream* dst,
637 ColumnMetadata* out) {

Callers 2

WriteMethod · 0.85
WriteColumnV1Function · 0.85

Calls 6

MakeArrayFunction · 0.50
type_idMethod · 0.45
lengthMethod · 0.45
null_countMethod · 0.45
dataMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected