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

Method Write

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

Source from the content-addressed store, hash-verified

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