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

Method OutOfBoundsListViewSize

cpp/src/arrow/array/validate.cc:866–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864
865 template <typename offset_type>
866 Status OutOfBoundsListViewSize(int64_t slot, int64_t offset_limit) {
867 const auto* offsets = data.GetValues<offset_type>(1);
868 const auto* sizes = data.GetValues<offset_type>(2);
869 const auto size = sizes[slot];
870 if (size < 0) {
871 return Status::Invalid("Offset invariant failure: size for slot ", slot,
872 " out of bounds: ", size, " < 0");
873 } else {
874 const auto offset = offsets[slot];
875 return Status::Invalid("Offset invariant failure: size for slot ", slot,
876 " out of bounds: ", offset, " + ", size, " > ",
877 offset_limit);
878 }
879 }
880
881 /// \pre basic validation has already been performed
882 template <typename offset_type>

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected