icexelloss commented on issue #37919: URL: https://github.com/apache/arrow/issues/37919#issuecomment-1779664789
> Can you solve your issue by adding a std::unique_ptr<KernelState> Clone() function to the kernels that lend themselves well to this optimization (i.e. kernels that have a compact state)? I think this is effectively the non destructive finalize method (by calling clone() + finalize). However, we still need a way to know when calling clone is needed: (1) If finalize is destructive, then the caller needs to call clone first if he wanted to reuse the kernel (2) If finalize is not destructive, then the caller don't need to call clone. So I still think we need a (1) general way to knowing if a Kernel has destructive finalize and (2) if a Kernel has a destructive finalize, support an optional "clone" method. Which feels to me to be the same thing as adding an optional "non destructive finalize"? -- 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]
