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

Function check_consistent_array_size

r/src/recordbatch.cpp:197–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195namespace r {
196
197arrow::Status check_consistent_array_size(
198 const std::vector<std::shared_ptr<arrow::Array>>& arrays, int64_t* num_rows) {
199 if (arrays.size()) {
200 *num_rows = arrays[0]->length();
201
202 for (const auto& array : arrays) {
203 if (array->length() != *num_rows) {
204 return arrow::Status::Invalid("All arrays must have the same length");
205 }
206 }
207 }
208
209 return arrow::Status::OK();
210}
211
212Status count_fields(SEXP lst, int* out) {
213 int res = 0;

Calls 4

InvalidClass · 0.50
OKFunction · 0.50
sizeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected