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

Method Consume

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

Source from the content-addressed store, hash-verified

2167StreamDecoder::~StreamDecoder() {}
2168
2169Status StreamDecoder::Consume(const uint8_t* data, int64_t size) {
2170 while (size > 0) {
2171 const auto next_required_size = impl_->next_required_size();
2172 if (next_required_size == 0) {
2173 break;
2174 }
2175 if (size < next_required_size) {
2176 break;
2177 }
2178 ARROW_RETURN_NOT_OK(impl_->Consume(data, next_required_size));
2179 data += next_required_size;
2180 size -= next_required_size;
2181 }
2182 if (size > 0) {
2183 return impl_->Consume(data, size);
2184 } else {
2185 return arrow::Status::OK();
2186 }
2187}
2188
2189Status StreamDecoder::Consume(std::shared_ptr<Buffer> buffer) {
2190 if (buffer->size() == 0) {

Callers 7

ConsumeMethod · 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 5

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