[ https://issues.apache.org/jira/browse/ARROW-4121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16729743#comment-16729743 ]
Micah Kornfield commented on ARROW-4121: ---------------------------------------- [~wesmckinn] Yes, sorry misleading title. I changed it. I'm still ramping up on the code base, so I'm not sure on the desired outcome here. Looking quickly at the the code in cast.cc (https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/cast.cc#L1103[)|https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/cast.cc#L710)] seems to be assuming that if the array buffers are already allocated those are fine to use. It seems there are a two things that could be done: # Replicate this pattern to the boolean kernels and document this contract. # Change/Add API entry points to make the choice on allocation more explicit and more generic. My intention was to move forward with option 1, and hopefully factor out some of the code from AllocateIfNotPreallocated to a utility method. If option 2 is desired, I would rather do a little bit more work with Kernels before I trying to propose an appropriate API. > [C++] Refactor memory allocation from InvertKernel > -------------------------------------------------- > > Key: ARROW-4121 > URL: https://issues.apache.org/jira/browse/ARROW-4121 > Project: Apache Arrow > Issue Type: Sub-task > Components: C++ > Reporter: Micah Kornfield > Assignee: Micah Kornfield > Priority: Major > > subtask for overall fix to remove memory allocation. Do this first to make > sure I understand the problem and acceptable solution (seems like a simple > API change). -- This message was sent by Atlassian JIRA (v7.6.3#76005)