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

Function CheckCastZeroCopy

cpp/src/arrow/compute/kernels/scalar_cast_test.cc:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131static 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
143static std::shared_ptr<Array> MaskArrayWithNullsAt(std::shared_ptr<Array> input,
144 std::vector<int> indices_to_mask) {

Callers 1

TESTFunction · 0.85

Calls 5

SafeFunction · 0.85
ValidateOutputFunction · 0.85
AssertBufferSameFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected