Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cpp/src/arrow/compute/compute-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class TestCast : public ComputeFixture, public TestBase {
std::shared_ptr<Array> result;
ASSERT_OK(Cast(&ctx_, input, out_type, options, &result));
ASSERT_ARRAYS_EQUAL(expected, *result);

std::shared_ptr<Array> result_sliced;
int64_t offset = input.length()/2;
ASSERT_OK(Cast(&ctx_, *input.Slice(offset), out_type, options, &result_sliced));
ASSERT_ARRAYS_EQUAL(*expected.Slice(offset), *result_sliced);
}

template <typename InType, typename I_TYPE>
Expand Down