westonpace commented on a change in pull request #11623:
URL: https://github.com/apache/arrow/pull/11623#discussion_r744060205
##########
File path: cpp/src/arrow/compute/kernels/vector_selection.cc
##########
@@ -2013,8 +2013,13 @@ Result<std::shared_ptr<ChunkedArray>> TakeCA(const
ChunkedArray& values,
// TODO Case 3: If indices are sorted, can slice them and call Array Take
// Case 4: Else, concatenate chunks and call Array Take
- ARROW_ASSIGN_OR_RAISE(current_chunk,
- Concatenate(values.chunks(), ctx->memory_pool()));
+ if (values.chunks().empty()) {
+ ARROW_ASSIGN_OR_RAISE(current_chunk, MakeArrayOfNull(values.type(),
/*length=*/0,
+
ctx->memory_pool()));
+ } else {
+ ARROW_ASSIGN_OR_RAISE(current_chunk,
+ Concatenate(values.chunks(), ctx->memory_pool()));
+ }
Review comment:
Do we need to apply this same fix for TakeCC below?
Note: TakeCC might not be in the GroupByNode path so this could maybe be
done as a separate JIRA.
--
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]