[
https://issues.apache.org/jira/browse/ARROW-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279316#comment-16279316
]
ASF GitHub Bot commented on ARROW-1487:
---------------------------------------
wesm commented on a change in pull request #1383: ARROW-1487: [C++] Implement
casts from List<A> to List<B>, where a cast function is defined from any A to B
URL: https://github.com/apache/arrow/pull/1383#discussion_r155099662
##########
File path: cpp/src/arrow/compute/kernels/cast.cc
##########
@@ -766,6 +806,7 @@ class CastKernel : public UnaryKernel {
bool is_zero_copy_;
bool can_pre_allocate_values_;
std::shared_ptr<DataType> out_type_;
+ std::vector<std::unique_ptr<UnaryKernel>> child_cast_kernels;
Review comment:
I think we can generalize to support struct casts and have instead a
`NestedCastKernel` when the time comes. I think we should defer that a bit
until we've dealt with the sliced list case. The problem with the current
`CastKernel` is that it's tied up in the business of memory allocation for
primitive arrays. We'll keep needing to do some refactoring around this as we
implement more kernels which are capable of writing into pre-allocated memory
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [C++] Implement casts from List<A> to List<B>, where a cast function is
> defined from any A to B
> -----------------------------------------------------------------------------------------------
>
> Key: ARROW-1487
> URL: https://issues.apache.org/jira/browse/ARROW-1487
> Project: Apache Arrow
> Issue Type: New Feature
> Components: C++
> Reporter: Wes McKinney
> Assignee: Licht Takeuchi
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> If a cast rule for the child type is not implemented, the failure should
> occur during kernel selection rather than at kernel evaluation time.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)