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

Method Write

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

Source from the content-addressed store, hash-verified

599 }
600
601 Status Write() {
602 if (values.type_id() == Type::DICTIONARY) {
603 return WriteArrayV1(*(checked_cast<const DictionaryArray&>(values).indices()), dst,
604 meta);
605 }
606
607 ARROW_ASSIGN_OR_RAISE(meta->type, ToFlatbufferType(*values.type()));
608 ARROW_ASSIGN_OR_RAISE(meta->offset, dst->Tell());
609 meta->length = values.length();
610 meta->null_count = values.null_count();
611 meta->total_bytes = 0;
612
613 // Write the null bitmask
614 if (values.null_count() > 0) {
615 RETURN_NOT_OK(WriteBuffer(values.null_bitmap_data(),
616 bit_util::BytesForBits(values.length()),
617 values.offset()));
618 }
619 // Write data buffer(s)
620 return VisitTypeInline(*values.type(), this);
621 }
622};
623
624Status WriteArrayV1(const Array& values, io::OutputStream* dst, ArrayMetadata* meta) {

Callers 11

WritePaddingFunction · 0.45
SerializeToMethod · 0.45
AlignStreamFunction · 0.45
WriteMessageFunction · 0.45
WriteFileFooterFunction · 0.45
GenerateTensorsFunction · 0.45
DoMainFunction · 0.45
WritePaddedWithOffsetFunction · 0.45
WritePaddedBlankFunction · 0.45
WriteArrayV1Function · 0.45
WriteFeatherV1Function · 0.45

Calls 12

WriteArrayV1Function · 0.85
ToFlatbufferTypeFunction · 0.85
BytesForBitsFunction · 0.85
VisitTypeInlineFunction · 0.85
indicesMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
type_idMethod · 0.45
typeMethod · 0.45
TellMethod · 0.45
lengthMethod · 0.45
null_countMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected