jorisvandenbossche commented on code in PR #14463:
URL: https://github.com/apache/arrow/pull/14463#discussion_r1163747456
##########
cpp/src/arrow/array/concatenate.cc:
##########
@@ -459,8 +459,17 @@ class ConcatenateImpl {
}
Status Visit(const ExtensionType& e) {
- // XXX can we just concatenate their storage?
- return Status::NotImplemented("concatenation of ", e);
+ ArrayDataVector storage_data(in_.size());
+ for (size_t i = 0; i < in_.size(); ++i) {
+ auto storage = in_[i]->Copy();
+ storage->type = e.storage_type();
+ storage_data[i] = storage;
+ }
+ std::shared_ptr<ArrayData> out_storage;
+ RETURN_NOT_OK(ConcatenateImpl(storage_data,
pool_).Concatenate(&out_storage));
Review Comment:
I would also assume that just creating an instance of such recursive
extension type will already fail, since instantiating the storage types would
also give a infinite recursive loop then.
--
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]