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

Method Consume

cpp/src/arrow/ipc/reader.cc:2195–2213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2193StreamDecoder::~StreamDecoder() {}
2194
2195Status StreamDecoder::Consume(const uint8_t* data, int64_t size) {
2196 while (size > 0) {
2197 const auto next_required_size = impl_->next_required_size();
2198 if (next_required_size == 0) {
2199 break;
2200 }
2201 if (size < next_required_size) {
2202 break;
2203 }
2204 ARROW_RETURN_NOT_OK(impl_->Consume(data, next_required_size));
2205 data += next_required_size;
2206 size -= next_required_size;
2207 }
2208 if (size > 0) {
2209 return impl_->Consume(data, size);
2210 } else {
2211 return arrow::Status::OK();
2212 }
2213}
2214
2215Status StreamDecoder::Consume(std::shared_ptr<Buffer> buffer) {
2216 if (buffer->size() == 0) {

Callers 8

ConsumeMethod · 0.45
CheckDecodingMethod · 0.45
DecodeStreamFunction · 0.45
DoConsumeMethod · 0.45
DoConsumeMethod · 0.45
DoConsumeMethod · 0.45
DoConsumeMethod · 0.45
TESTFunction · 0.45

Calls 7

SliceBufferFunction · 0.85
message_decoderMethod · 0.80
OKFunction · 0.50
next_required_sizeMethod · 0.45
sizeMethod · 0.45
stateMethod · 0.45
dataMethod · 0.45

Tested by 6

CheckDecodingMethod · 0.36
DoConsumeMethod · 0.36
DoConsumeMethod · 0.36
DoConsumeMethod · 0.36
DoConsumeMethod · 0.36
TESTFunction · 0.36