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

Function WriteArrayV1

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

Source from the content-addressed store, hash-verified

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