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

Function TEST_F

cpp/src/arrow/compute/exec_test.cc:215–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213class TestPropagateNulls : public TestComputeInternals {};
214
215TEST_F(TestPropagateNulls, UnknownNullCountWithNullsZeroCopies) {
216 const int64_t length = 16;
217
218 constexpr uint8_t validity_bitmap[8] = {254, 0, 0, 0, 0, 0, 0, 0};
219 auto nulls = std::make_shared<Buffer>(validity_bitmap, 8);
220
221 ArrayData output(boolean(), length, {nullptr, nullptr});
222 ArrayData input(boolean(), length, {nulls, nullptr}, kUnknownNullCount);
223
224 ExecBatch batch({input}, length);
225 ASSERT_OK(PropagateNulls(ctx_.get(), ExecSpan(batch), &output));
226 ASSERT_EQ(nulls.get(), output.buffers[0].get());
227 ASSERT_EQ(kUnknownNullCount, output.null_count);
228 ASSERT_EQ(9, output.GetNullCount());
229}
230
231TEST_F(TestPropagateNulls, UnknownNullCountWithoutNulls) {
232 const int64_t length = 16;

Callers

nothing calls this directly

Calls 15

PropagateNullsFunction · 0.85
MakeNullScalarFunction · 0.85
BytesForBitsFunction · 0.85
PropagateNullsSpansFunction · 0.85
AssertArraysEqualFunction · 0.85
struct_Function · 0.85
GetNullCountMethod · 0.80
SetBufferMethod · 0.80
make_arrayMethod · 0.80
is_arrayMethod · 0.80
ExecSpanFunction · 0.70

Tested by

no test coverage detected