mapleFU commented on code in PR #41975: URL: https://github.com/apache/arrow/pull/41975#discussion_r1638444881
########## cpp/src/arrow/compute/exec.cc: ########## @@ -1123,6 +1142,34 @@ class VectorExecutor : public KernelExecutorImpl<VectorKernel> { } } + Status SetupPreallocation(const std::vector<Datum>& args) { Review Comment: > The difference between this function and SetupPreallocation of ScalarExecutor is that ScalarExecutor does not have an independent chunk_exec, so it needs to use preallocate_contiguous_ to confirm whether it needs to execute PrepareOutput according to chunks through span_iterator_, which is not required in VectorExecutor. Do you think we can extract `SetupPreallocation` to base class and extract common logic out, then implement handling for chunked array with: ``` void SetupPreallocation(...) final { Base::SetupPreallocation(...) ... } ``` ? And what if `kernel_->null_handling == NullHandling::OUTPUT_NOT_NULL`? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org