| 129 | } |
| 130 | |
| 131 | static void CheckCastZeroCopy(std::shared_ptr<Array> input, |
| 132 | std::shared_ptr<DataType> to_type, |
| 133 | CastOptions options = CastOptions::Safe()) { |
| 134 | ASSERT_OK_AND_ASSIGN(auto converted, Cast(*input, to_type, options)); |
| 135 | ValidateOutput(*converted); |
| 136 | |
| 137 | ASSERT_EQ(input->data()->buffers.size(), converted->data()->buffers.size()); |
| 138 | for (size_t i = 0; i < input->data()->buffers.size(); ++i) { |
| 139 | AssertBufferSame(*input, *converted, static_cast<int>(i)); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | static std::shared_ptr<Array> MaskArrayWithNullsAt(std::shared_ptr<Array> input, |
| 144 | std::vector<int> indices_to_mask) { |
no test coverage detected