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

Method Consume

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

Source from the content-addressed store, hash-verified

2178StreamDecoder::~StreamDecoder() {}
2179
2180Status StreamDecoder::Consume(const uint8_t* data, int64_t size) {
2181 while (size > 0) {
2182 const auto next_required_size = impl_->next_required_size();
2183 if (next_required_size == 0) {
2184 break;
2185 }
2186 if (size < next_required_size) {
2187 break;
2188 }
2189 ARROW_RETURN_NOT_OK(impl_->Consume(data, next_required_size));
2190 data += next_required_size;
2191 size -= next_required_size;
2192 }
2193 if (size > 0) {
2194 return impl_->Consume(data, size);
2195 } else {
2196 return arrow::Status::OK();
2197 }
2198}
2199
2200Status StreamDecoder::Consume(std::shared_ptr<Buffer> buffer) {
2201 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