lidavidm commented on code in PR #13398:
URL: https://github.com/apache/arrow/pull/13398#discussion_r902604395
##########
cpp/src/arrow/array/data.cc:
##########
@@ -208,7 +215,6 @@ int64_t ArraySpan::GetNullCount() const {
int GetNumBuffers(const DataType& type) {
switch (type.id()) {
case Type::NA:
- return 0;
Review Comment:
Is this correct?
##########
cpp/src/arrow/array/data.cc:
##########
@@ -151,6 +151,13 @@ void ArraySpan::SetMembers(const ArrayData& data) {
}
}
+ Type::type type_id = this->type->id();
+ if (data.buffers[0] == nullptr && type_id != Type::NA &&
+ type_id != Type::SPARSE_UNION && type_id != Type::DENSE_UNION) {
Review Comment:
nit: there's [`arrow::internal::HasValidityBitmap` in
`arrow/type.h`](https://github.com/apache/arrow/blob/d49d8de3a9158f66ff7073fe077c5c292e38de6e/cpp/src/arrow/type.h#L2043-L2052)
##########
cpp/src/arrow/compute/kernels/vector_replace.cc:
##########
@@ -442,25 +382,91 @@ struct ReplaceWithMaskFunctor {
}
};
+template <typename Type>
+struct ReplaceMaskChunked {
+ static Status Exec(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
+ const Datum& mask = batch[1];
+ const Datum& replacements = batch[2];
+
+ // TODO(wesm): these assertions that the arguments cannot be ChunkedArray
+ // should happen someplace more generic, not here
Review Comment:
I think for this function we eventually do want to support chunked arrays in
all positions, it just wasn't implemented
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]