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

Method validate_slice_offset

r/src/array.cpp:53–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51} // namespace cpp11
52
53void arrow::r::validate_slice_offset(R_xlen_t offset, int64_t len) {
54 if (offset == NA_INTEGER) {
55 cpp11::stop("Slice 'offset' cannot be NA");
56 }
57 if (offset < 0) {
58 cpp11::stop("Slice 'offset' cannot be negative");
59 }
60 if (offset > len) {
61 cpp11::stop("Slice 'offset' greater than array length");
62 }
63}
64
65void arrow::r::validate_slice_length(R_xlen_t length, int64_t available) {
66 if (length == NA_INTEGER) {

Callers

nothing calls this directly

Calls 1

stopFunction · 0.85

Tested by

no test coverage detected