| 3917 | } |
| 3918 | |
| 3919 | static ArrayFactory SlicedArrayFactory(ArrayFactory factory) { |
| 3920 | return [=]() -> Result<std::shared_ptr<Array>> { |
| 3921 | ARROW_ASSIGN_OR_RAISE(auto arr, factory()); |
| 3922 | DCHECK_GE(arr->length(), 2); |
| 3923 | return arr->Slice(1, arr->length() - 2); |
| 3924 | }; |
| 3925 | } |
| 3926 | |
| 3927 | template <typename ArrayFactory> |
| 3928 | void TestWithArrayFactory(ArrayFactory&& factory) { |