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

Function NullBitmapFromArrays

cpp/src/arrow/compute/kernels/scalar_compare_test.cc:167–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166template <typename ArrayType>
167std::vector<bool> NullBitmapFromArrays(const ArrayType& lhs, const ArrayType& rhs) {
168 auto left_lambda = [&lhs](int64_t i) {
169 return lhs.null_count() == 0 ? true : lhs.IsValid(i);
170 };
171
172 auto right_lambda = [&rhs](int64_t i) {
173 return rhs.null_count() == 0 ? true : rhs.IsValid(i);
174 };
175
176 const int64_t length = lhs.length();
177 std::vector<bool> null_bitmap(length);
178
179 for (int64_t i = 0; i < length; i++) {
180 null_bitmap[i] = left_lambda(i) && right_lambda(i);
181 }
182
183 return null_bitmap;
184}
185
186template <typename ArrowType>
187Datum SimpleArrayArrayCompare(CompareOptions options, const Datum& lhs,

Callers 2

SimpleArrayArrayCompareFunction · 0.85

Calls 3

null_countMethod · 0.45
IsValidMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected