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

Function DropNullArray

cpp/src/arrow/compute/kernels/vector_selection.cc:79–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79Result<Datum> DropNullArray(const std::shared_ptr<Array>& values, ExecContext* ctx) {
80 if (values->null_count() == 0) {
81 return values;
82 }
83 if (values->null_count() == values->length()) {
84 return MakeEmptyArray(values->type(), ctx->memory_pool());
85 }
86 if (values->type()->id() == Type::type::NA) {
87 return std::make_shared<NullArray>(0);
88 }
89 auto drop_null_filter = Datum{MakeDropNullFilter(*values)};
90 return Filter(values, drop_null_filter, FilterOptions::Defaults(), ctx);
91}
92
93Result<Datum> DropNullChunkedArray(const std::shared_ptr<ChunkedArray>& values,
94 ExecContext* ctx) {

Callers 1

ExecuteImplMethod · 0.85

Calls 9

MakeDropNullFilterFunction · 0.85
FilterFunction · 0.85
MakeEmptyArrayFunction · 0.50
DefaultsFunction · 0.50
null_countMethod · 0.45
lengthMethod · 0.45
typeMethod · 0.45
memory_poolMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected