felipecrv commented on code in PR #35345:
URL: https://github.com/apache/arrow/pull/35345#discussion_r1337527110
##########
cpp/src/arrow/array/concatenate.cc:
##########
@@ -602,8 +691,11 @@ class ConcatenateImpl {
} // namespace
Result<std::shared_ptr<Array>> Concatenate(const ArrayVector& arrays,
MemoryPool* pool) {
- if (arrays.size() == 0) {
- return Status::Invalid("Must pass at least one array");
+ switch (arrays.size()) {
+ case 0:
+ return Status::Invalid("Must pass at least one array");
+ case 1:
+ return arrays[0];
Review Comment:
I will undo this. This was done after the initial reviews on this PR. I was
also optimizing concatenation of children values when they were a single array,
but I will also get rid of that and add an explicit comment about the reason.
--
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]