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

Method ValidateBuffer

cpp/src/gandiva/selection_vector.cc:168–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166
167template <typename C_TYPE, typename A_TYPE, SelectionVector::Mode mode>
168Status SelectionVectorImpl<C_TYPE, A_TYPE, mode>::ValidateBuffer(
169 int64_t max_slots, std::shared_ptr<arrow::Buffer> buffer) {
170 ARROW_RETURN_IF(!buffer->is_mutable(),
171 Status::Invalid("buffer for selection vector must be mutable"));
172
173 const int64_t min_len = max_slots * sizeof(C_TYPE);
174 ARROW_RETURN_IF(buffer->size() < min_len,
175 Status::Invalid("Buffer for selection vector is too small"));
176
177 return Status::OK();
178}
179
180} // namespace gandiva

Callers

nothing calls this directly

Calls 3

InvalidFunction · 0.50
OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected